Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / django-payments / default.nix
blobd470bb57a2e50f6723341e693bd4de97cadc009b
1 { lib
2 , buildPythonPackage
3 , braintree
4 , cryptography
5 , django
6 , django-phonenumber-field
7 , fetchFromGitHub
8 , mercadopago
9 , pythonOlder
10 , requests
11 , setuptools-scm
12 , sphinx-rtd-theme
13 , stripe
14 , xmltodict
17 buildPythonPackage rec {
18   pname = "django-payments";
19   version = "2.0.0";
20   format = "setuptools";
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "jazzband";
26     repo = "django-payments";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-6WPV08CV+rko/tRnsT5GyTGYaJbiIKTvpisfRwizBIo=";
29   };
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "django-phonenumber-field[phonenumberslite]" "django-phonenumber-field"
34   '';
36   nativeBuildInputs = [
37     setuptools-scm
38   ];
40   propagatedBuildInputs = [
41     django
42     django-phonenumber-field
43     requests
44   ] ++ django-phonenumber-field.optional-dependencies.phonenumbers;
46   # require internet connection
47   doCheck = false;
49   pythonImportsCheck = [
50     "payments"
51   ];
53   passthru.optional-dependencies = {
54     all = [ braintree /* suds-community */ mercadopago cryptography xmltodict stripe ];
55     braintree = [ braintree ];
56     cybersource = [ /* suds-community */ ];
57     docs = [ sphinx-rtd-theme ];
58     mercadopago = [ mercadopago ];
59     sagepay = [ cryptography ];
60     sofort = [ xmltodict ];
61     stripe = [ stripe ];
62   };
64   meta = with lib; {
65     description = "Universal payment handling for Django.";
66     homepage = "https://github.com/jazzband/django-payments/";
67     changelog = "https://github.com/jazzband/django-payments/releases/tag/v${version}";
68     license = licenses.bsd3;
69     maintainers = with maintainers; [ derdennisop ];
70   };