python312Packages.dash-renderer: remove (#369714)
[NixPkgs.git] / pkgs / development / python-modules / django-configurations / default.nix
bloba7c944f981678b1398f967c3c9b02e532f6607c9
2   lib,
3   buildPythonPackage,
4   dj-database-url,
5   dj-email-url,
6   dj-search-url,
7   django,
8   django-cache-url,
9   fetchPypi,
10   importlib-metadata,
11   mock,
12   pythonOlder,
13   setuptools-scm,
16 buildPythonPackage rec {
17   pname = "django-configurations";
18   version = "2.5.1";
19   format = "setuptools";
21   disabled = pythonOlder "3.6";
23   src = fetchPypi {
24     inherit pname version;
25     hash = "sha256-blCDdX4rvfm7eFBWdTa5apNRX2sXUD10ko/2KNsuDpQ=";
26   };
28   buildInputs = [ setuptools-scm ];
30   propagatedBuildInputs = [ django ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
32   nativeCheckInputs = [
33     mock
34     dj-database-url
35     dj-email-url
36     dj-search-url
37     django-cache-url
38   ];
40   checkPhase = ''
41     export PYTHONPATH=.:$PYTHONPATH
42     export DJANGO_SETTINGS_MODULE="tests.settings.main"
43     export DJANGO_CONFIGURATION="Test"
44     ${django}/bin/django-admin.py test
45   '';
47   # django.core.exceptions.ImproperlyConfigured: django-configurations settings importer wasn't correctly installed
48   doCheck = false;
50   pythonImportsCheck = [ "configurations" ];
52   meta = with lib; {
53     description = "Helper for organizing Django settings";
54     mainProgram = "django-cadmin";
55     homepage = "https://django-configurations.readthedocs.io/";
56     license = licenses.bsd0;
57     maintainers = [ ];
58   };