diff --git a/pkgs/by-name/pr/pretix/package.nix b/pkgs/by-name/pr/pretix/package.nix index ebcab4bda0cc2..2c6e7ccc16db5 100644 --- a/pkgs/by-name/pr/pretix/package.nix +++ b/pkgs/by-name/pr/pretix/package.nix @@ -90,6 +90,7 @@ python.pkgs.buildPythonApplication rec { ]; pythonRelaxDeps = [ + "django-phonenumber-field" "importlib-metadata" "kombu" "markdown" @@ -102,8 +103,6 @@ python.pkgs.buildPythonApplication rec { ]; pythonRemoveDeps = [ - "phonenumberslite" # we provide phonenumbers instead - "psycopg2-binary" # we provide psycopg2 instead "vat-moss-forked" # we provide a patched vat-moss package ]; @@ -175,11 +174,11 @@ python.pkgs.buildPythonApplication rec { paypalrestsdk paypal-checkout-serversdk pyjwt - phonenumbers + phonenumberslite pillow pretix-plugin-build protobuf - psycopg2 + psycopg2-binary pycountry pycparser pycryptodome diff --git a/pkgs/development/python-modules/django-payments/default.nix b/pkgs/development/python-modules/django-payments/default.nix index 935808b32c792..62e4484e45537 100644 --- a/pkgs/development/python-modules/django-payments/default.nix +++ b/pkgs/development/python-modules/django-payments/default.nix @@ -13,12 +13,13 @@ setuptools-scm, sphinx-rtd-theme, stripe, + suds-community, xmltodict, }: buildPythonPackage rec { pname = "django-payments"; - version = "2.0.0"; + version = "3.0.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -27,14 +28,9 @@ buildPythonPackage rec { owner = "jazzband"; repo = "django-payments"; rev = "refs/tags/v${version}"; - hash = "sha256-6WPV08CV+rko/tRnsT5GyTGYaJbiIKTvpisfRwizBIo="; + hash = "sha256-/XsqtExnNtUGqI40XvvcO/nGq56gbC/mPdtHv1QQyGo="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail "django-phonenumber-field[phonenumberslite]" "django-phonenumber-field" - ''; - build-system = [ setuptools setuptools-scm @@ -44,26 +40,16 @@ buildPythonPackage rec { django django-phonenumber-field requests - ] ++ django-phonenumber-field.optional-dependencies.phonenumbers; + ] ++ django-phonenumber-field.optional-dependencies.phonenumberslite; # require internet connection doCheck = false; pythonImportsCheck = [ "payments" ]; - passthru.optional-dependencies = { - all = [ - braintree # suds-community - mercadopago - cryptography - xmltodict - stripe - ]; + optional-dependencies = { braintree = [ braintree ]; - cybersource = [ - # suds-community - ]; - docs = [ sphinx-rtd-theme ]; + cybersource = [ suds-community ]; mercadopago = [ mercadopago ]; sagepay = [ cryptography ]; sofort = [ xmltodict ]; @@ -73,7 +59,7 @@ buildPythonPackage rec { meta = with lib; { description = "Universal payment handling for Django"; homepage = "https://github.com/jazzband/django-payments/"; - changelog = "https://github.com/jazzband/django-payments/releases/tag/v${version}"; + changelog = "https://github.com/jazzband/django-payments/blob/${src.rev}/CHANGELOG.rst"; license = licenses.bsd3; maintainers = with maintainers; [ derdennisop ]; }; diff --git a/pkgs/development/python-modules/django-phonenumber-field/default.nix b/pkgs/development/python-modules/django-phonenumber-field/default.nix index e58bb4e81cffa..39cd78b2f495b 100644 --- a/pkgs/development/python-modules/django-phonenumber-field/default.nix +++ b/pkgs/development/python-modules/django-phonenumber-field/default.nix @@ -4,8 +4,9 @@ buildPythonPackage, django, djangorestframework, - fetchPypi, + fetchFromGitHub, phonenumbers, + phonenumberslite, python, pythonOlder, setuptools-scm, @@ -13,19 +14,25 @@ buildPythonPackage rec { pname = "django-phonenumber-field"; - version = "7.3.0"; - format = "pyproject"; + version = "8.0.0"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-+c2z3ghfmcJJMoKTo7k9Tl+kQMDI47mesND1R0hil5c="; + src = fetchFromGitHub { + owner = "stefanfoulis"; + repo = "django-phonenumber-field"; + rev = "refs/tags/${version}"; + hash = "sha256-l+BAh7QYGN0AgDHICvlQnBYAcpEn8acu+JBmoo85kF0="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ setuptools-scm ]; - propagatedBuildInputs = [ django ] ++ passthru.optional-dependencies.phonenumbers; + # Upstream doesn't put phonenumbers in dependencies but the package doesn't + # make sense without either of the two optional dependencies. Since, in + # Nixpkgs, phonenumberslite depends on phonenumbers, add the latter + # unconditionally. + dependencies = [ django ] ++ optional-dependencies.phonenumbers; nativeCheckInputs = [ babel @@ -38,8 +45,9 @@ buildPythonPackage rec { ${python.interpreter} -m django test --settings tests.settings ''; - passthru.optional-dependencies = { + optional-dependencies = { phonenumbers = [ phonenumbers ]; + phonenumberslite = [ phonenumberslite ]; }; meta = with lib; { diff --git a/pkgs/development/python-modules/flask-security/default.nix b/pkgs/development/python-modules/flask-security/default.nix index e202a68ab480c..8cfc0f5996b97 100644 --- a/pkgs/development/python-modules/flask-security/default.nix +++ b/pkgs/development/python-modules/flask-security/default.nix @@ -22,7 +22,7 @@ # extras: mfa cryptography, - phonenumbers, + phonenumberslite, webauthn, qrcode, @@ -63,11 +63,6 @@ buildPythonPackage rec { hash = "sha256-RGRwgrDFe+0v8NYyajMikdoi1DQf1I+B5y8KJyF+cZs="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace-fail phonenumberslite phonenumbers - ''; - build-system = [ flit-core ]; # flask-login>=0.6.2 not satisfied by version 0.7.0.dev0 @@ -103,7 +98,7 @@ buildPythonPackage rec { ]; mfa = [ cryptography - phonenumbers + phonenumberslite webauthn qrcode ]; diff --git a/pkgs/development/python-modules/phonenumberslite/default.nix b/pkgs/development/python-modules/phonenumberslite/default.nix new file mode 100644 index 0000000000000..c2e80c4786079 --- /dev/null +++ b/pkgs/development/python-modules/phonenumberslite/default.nix @@ -0,0 +1,14 @@ +{ + mkPythonMetaPackage, + phonenumbers, +}: + +mkPythonMetaPackage { + pname = "phonenumberslite"; + inherit (phonenumbers) version; + dependencies = [ phonenumbers ]; + optional-dependencies = phonenumbers.optional-dependencies or { }; + meta = { + inherit (phonenumbers.meta) changelog description homepage; + }; +} diff --git a/pkgs/development/python-modules/suds-community/default.nix b/pkgs/development/python-modules/suds-community/default.nix new file mode 100644 index 0000000000000..e3a9d8a129877 --- /dev/null +++ b/pkgs/development/python-modules/suds-community/default.nix @@ -0,0 +1,14 @@ +{ + mkPythonMetaPackage, + suds, +}: + +mkPythonMetaPackage { + pname = "suds-community"; + inherit (suds) version; + dependencies = [ suds ]; + optional-dependencies = suds.optional-dependencies or { }; + meta = { + inherit (suds.meta) changelog description homepage; + }; +} diff --git a/pkgs/development/python-modules/suds/default.nix b/pkgs/development/python-modules/suds/default.nix index 054f0b0cb4346..35dc2eeaa5bc1 100644 --- a/pkgs/development/python-modules/suds/default.nix +++ b/pkgs/development/python-modules/suds/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, pytestCheckHook, setuptools, six, @@ -9,16 +9,20 @@ buildPythonPackage rec { pname = "suds"; - version = "1.1.2"; + version = "1.2.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-HVz6dBFxk7JEpCM/JGxIPZ9BGYtEjF8UqLrRHE9knys="; + src = fetchFromGitHub { + owner = "suds-community"; + repo = "suds"; + rev = "refs/tags/v${version}"; + hash = "sha256-YdL+zDelRspQ6VMqa45vK1DDS3HjFvKE1P02USVBrEo="; }; build-system = [ setuptools ]; + env.SUDS_PACKAGE = "suds"; + nativeCheckInputs = [ pytestCheckHook six diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5292ba1d907ed..4332f6d5adccd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10111,6 +10111,8 @@ self: super: with self; { phonenumbers = callPackage ../development/python-modules/phonenumbers { }; + phonenumberslite = callPackage ../development/python-modules/phonenumberslite { }; + photutils = callPackage ../development/python-modules/photutils { }; pkgutil-resolve-name = callPackage ../development/python-modules/pkgutil-resolve-name { }; @@ -15282,6 +15284,8 @@ self: super: with self; { suds = callPackage ../development/python-modules/suds { }; + suds-community = callPackage ../development/python-modules/suds-community { }; + sumo = callPackage ../development/python-modules/sumo { }; sumtypes = callPackage ../development/python-modules/sumtypes { };