Unverified Commit 48689f5d authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

python312Packages.phonenumberslite: init at 8.13.39 (#338283)

parents e5fa65b1 7e377b1a
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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
+7 −21
Original line number Diff line number Diff line
@@ -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 ];
  };
+17 −9
Original line number Diff line number Diff line
@@ -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; {
+2 −7
Original line number Diff line number Diff line
@@ -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
    ];
+14 −0
Original line number Diff line number Diff line
{
  mkPythonMetaPackage,
  phonenumbers,
}:

mkPythonMetaPackage {
  pname = "phonenumberslite";
  inherit (phonenumbers) version;
  dependencies = [ phonenumbers ];
  optional-dependencies = phonenumbers.optional-dependencies or { };
  meta = {
    inherit (phonenumbers.meta) changelog description homepage;
  };
}
Loading