1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # propagates
7 pyopenssl,
8 requests,
9 six,
10
11 # tests
12 pytestCheckHook,
13 responses,
14}:
15
16buildPythonPackage rec {
17 pname = "paypalhttp";
18 version = "1.0.0";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "paypal";
23 repo = "paypalhttp_python";
24 rev = "refs/tags/${version}";
25 hash = "sha256-3ihcpYtpcejPkiyf4g4jveyNU6flQB2sv9EZ5Pd7tUc=";
26 };
27
28 postPatch = ''
29 substituteInPlace tests/http_response_test.py \
30 --replace-fail assertEquals assertEqual
31 '';
32
33 propagatedBuildInputs = [
34 requests
35 six
36 pyopenssl
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 responses
42 ];
43
44 meta = with lib; {
45 changelog = "https://github.com/paypal/paypalhttp_python/releases/tag/${version}";
46 description = "PayPalHttp is a generic HTTP Client";
47 homepage = "https://github.com/paypal/paypalhttp_python";
48 license = licenses.mit;
49 maintainers = with maintainers; [ hexa ];
50 };
51}