python310Packages.django-phonenumber-field: add optional-dependencies, move babel to tests

babel is optional
This commit is contained in:
Dennis 2023-04-07 19:32:13 +02:00
parent 4bc8335bb4
commit 373e52bcfe

View File

@ -32,11 +32,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [
django
phonenumbers
babel
];
] ++ passthru.optional-dependencies.phonenumbers;
nativeCheckInputs = [
babel
djangorestframework
];
@ -48,6 +47,10 @@ buildPythonPackage rec {
${python.interpreter} -m django test --settings tests.settings
'';
passthru.optional-dependencies = {
phonenumbers = [ phonenumbers ];
};
meta = with lib; {
description = "A django model and form field for normalised phone numbers using python-phonenumbers";
homepage = "https://github.com/stefanfoulis/django-phonenumber-field/";