2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, dj-database-url
|
|
|
|
, dj-email-url
|
|
|
|
, dj-search-url
|
|
|
|
, django
|
2021-12-26 17:43:05 +00:00
|
|
|
, django-cache-url
|
|
|
|
, fetchPypi
|
|
|
|
, importlib-metadata
|
|
|
|
, mock
|
|
|
|
, pythonOlder
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-configurations";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "2.4.1";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-psJcFDg05nsg00dRUS0IsykGhPJQmO4hKx7jaASlkIU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-26 17:43:05 +00:00
|
|
|
mock
|
|
|
|
dj-database-url
|
|
|
|
dj-email-url
|
|
|
|
dj-search-url
|
|
|
|
django-cache-url
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
export PYTHONPATH=.:$PYTHONPATH
|
|
|
|
export DJANGO_SETTINGS_MODULE="tests.settings.main"
|
|
|
|
export DJANGO_CONFIGURATION="Test"
|
|
|
|
${django}/bin/django-admin.py test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# django.core.exceptions.ImproperlyConfigured: django-configurations settings importer wasn't correctly installed
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"configurations"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A helper for organizing Django settings";
|
2021-12-26 17:43:05 +00:00
|
|
|
homepage = "https://django-configurations.readthedocs.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd0;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|