depot/third_party/nixpkgs/pkgs/development/python-modules/paypalhttp/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

50 lines
976 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
# propagates
, pyopenssl
, requests
, six
# tests
, pytestCheckHook
, responses
}:
buildPythonPackage rec {
pname = "paypalhttp";
version = "1.0.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "paypal";
repo = "paypalhttp_python";
rev = "refs/tags/${version}";
hash = "sha256-3ihcpYtpcejPkiyf4g4jveyNU6flQB2sv9EZ5Pd7tUc=";
};
postPatch = ''
substituteInPlace tests/http_response_test.py \
--replace-fail assertEquals assertEqual
'';
propagatedBuildInputs = [
requests
six
pyopenssl
];
nativeCheckInputs = [
pytestCheckHook
responses
];
meta = with lib; {
changelog = "https://github.com/paypal/paypalhttp_python/releases/tag/${version}";
description = "PayPalHttp is a generic HTTP Client";
homepage = "https://github.com/paypal/paypalhttp_python";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}