Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / django-phonenumber-field / default.nix
blob6f952c9865a9e8ffc63670e9efe0937e69399bf9
1 { lib
2 , babel
3 , buildPythonPackage
4 , django
5 , djangorestframework
6 , fetchPypi
7 , phonenumbers
8 , python
9 , pythonOlder
10 , setuptools-scm
13 buildPythonPackage rec {
14   pname = "django-phonenumber-field";
15   version = "7.3.0";
16   format = "pyproject";
18   disabled = pythonOlder "3.8";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-+c2z3ghfmcJJMoKTo7k9Tl+kQMDI47mesND1R0hil5c=";
23   };
25   nativeBuildInputs = [
26     setuptools-scm
27   ];
29   propagatedBuildInputs = [
30     django
31   ] ++ passthru.optional-dependencies.phonenumbers;
33   nativeCheckInputs = [
34     babel
35     djangorestframework
36   ];
38   pythonImportsCheck = [
39     "phonenumber_field"
40   ];
42   checkPhase = ''
43     ${python.interpreter} -m django test --settings tests.settings
44   '';
46   passthru.optional-dependencies = {
47     phonenumbers = [ phonenumbers ];
48   };
50   meta = with lib; {
51     description = "A django model and form field for normalised phone numbers using python-phonenumbers";
52     homepage = "https://github.com/stefanfoulis/django-phonenumber-field/";
53     changelog = "https://github.com/stefanfoulis/django-phonenumber-field/releases/tag/${version}";
54     license = licenses.mit;
55     maintainers = with maintainers; [ sephi ];
56   };