about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/stripe/default.nix
blob: 180ff758080666b2fd254baf016a2cd1613a95cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, buildPythonPackage, fetchPypi, requests, toml, pytest, pytestcov, pytest-mock, pytest_xdist }:

buildPythonPackage rec {
  pname = "stripe";
  version = "2.29.3";

  # Tests require network connectivity and there's no easy way to disable
  # them. ~ C.
  doCheck = false;

  src = fetchPypi {
    inherit pname version;
    sha256 = "73f9af72ef8125e0d1c713177d006f1cbe95602beb3e10cb0b0a4ae358d1ae86";
  };

  postPatch = ''
    substituteInPlace setup.py --replace "toml>=0.9,<0.10" "toml>=0.9"
  '';

  propagatedBuildInputs = [ toml requests ];

  checkInputs = [ pytest pytestcov pytest-mock pytest_xdist ];

  meta = with lib; {
    description = "Stripe Python bindings";
    homepage = https://github.com/stripe/stripe-python;
    license = licenses.mit;
  };
}