ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / django-configurations / default.nix
bloba57308dcfb4f0f34d6c23ec8ecfabbdcc9f8e006
1 { lib
2 , buildPythonPackage
3 , dj-database-url
4 , dj-email-url
5 , dj-search-url
6 , django
7 , django-cache-url
8 , django-discover-runner
9 , fetchPypi
10 , importlib-metadata
11 , mock
12 , pythonOlder
13 , setuptools-scm
16 buildPythonPackage rec {
17   pname = "django-configurations";
18   version = "2.4";
19   format = "setuptools";
21   disabled = pythonOlder "3.6";
23   src = fetchPypi {
24     inherit pname version;
25     sha256 = "sha256-IrmWTmtlfa/Ho1QQoRXSDxRRFJqCc3rcbDMew2WIgZY=";
26   };
28   buildInputs = [
29     setuptools-scm
30   ];
32   propagatedBuildInputs = [
33     django
34   ] ++ lib.optionals (pythonOlder "3.8") [
35     importlib-metadata
36   ];
38   checkInputs = [
39     django-discover-runner
40     mock
41     dj-database-url
42     dj-email-url
43     dj-search-url
44     django-cache-url
45   ];
47   checkPhase = ''
48     export PYTHONPATH=.:$PYTHONPATH
49     export DJANGO_SETTINGS_MODULE="tests.settings.main"
50     export DJANGO_CONFIGURATION="Test"
51     ${django}/bin/django-admin.py test
52   '';
54   # django.core.exceptions.ImproperlyConfigured: django-configurations settings importer wasn't correctly installed
55   doCheck = false;
57   pythonImportsCheck = [
58     "configurations"
59   ];
61   meta = with lib; {
62     description = "A helper for organizing Django settings";
63     homepage = "https://django-configurations.readthedocs.io/";
64     license = licenses.bsd0;
65     maintainers = with maintainers; [ costrouc ];
66   };