Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / django-configurations / default.nix
blobba32b7576403583234099aaf6a00d182c5f188da
1 { lib
2 , buildPythonPackage
3 , dj-database-url
4 , dj-email-url
5 , dj-search-url
6 , django
7 , django-cache-url
8 , fetchPypi
9 , importlib-metadata
10 , mock
11 , pythonOlder
12 , setuptools-scm
15 buildPythonPackage rec {
16   pname = "django-configurations";
17   version = "2.5";
18   format = "setuptools";
20   disabled = pythonOlder "3.6";
22   src = fetchPypi {
23     inherit pname version;
24     hash = "sha256-Y/olLEDciOoXuLkPX0oxonJuWGrLH/Dtx0wijGHxnl0=";
25   };
27   buildInputs = [
28     setuptools-scm
29   ];
31   propagatedBuildInputs = [
32     django
33   ] ++ lib.optionals (pythonOlder "3.8") [
34     importlib-metadata
35   ];
37   nativeCheckInputs = [
38     mock
39     dj-database-url
40     dj-email-url
41     dj-search-url
42     django-cache-url
43   ];
45   checkPhase = ''
46     export PYTHONPATH=.:$PYTHONPATH
47     export DJANGO_SETTINGS_MODULE="tests.settings.main"
48     export DJANGO_CONFIGURATION="Test"
49     ${django}/bin/django-admin.py test
50   '';
52   # django.core.exceptions.ImproperlyConfigured: django-configurations settings importer wasn't correctly installed
53   doCheck = false;
55   pythonImportsCheck = [
56     "configurations"
57   ];
59   meta = with lib; {
60     description = "A helper for organizing Django settings";
61     homepage = "https://django-configurations.readthedocs.io/";
62     license = licenses.bsd0;
63     maintainers = with maintainers; [ ];
64   };