evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / httplib2 / default.nix
bloba6c3e42a5317fc22644e62b15981e108727ff087
2   lib,
3   stdenv,
4   buildPythonPackage,
5   cryptography,
6   fetchFromGitHub,
7   mock,
8   pyparsing,
9   pytest-forked,
10   pytest-randomly,
11   pytest-timeout,
12   pytestCheckHook,
13   pythonAtLeast,
14   six,
17 buildPythonPackage rec {
18   pname = "httplib2";
19   version = "0.22.0";
20   format = "setuptools";
22   src = fetchFromGitHub {
23     owner = pname;
24     repo = pname;
25     rev = "v${version}";
26     hash = "sha256-76gdiRbF535CEaNXwNqsVeVc0dKglovMPQpGsOkbd/4=";
27   };
29   postPatch = ''
30     sed -i "/--cov/d" setup.cfg
31   '';
33   propagatedBuildInputs = [ pyparsing ];
35   nativeCheckInputs = [
36     cryptography
37     mock
38     pytest-forked
39     pytest-randomly
40     pytest-timeout
41     six
42     pytestCheckHook
43   ];
45   __darwinAllowLocalNetworking = true;
47   # Don't run tests for older Pythons
48   doCheck = pythonAtLeast "3.9";
50   disabledTests =
51     [
52       # ValueError: Unable to load PEM file.
53       # https://github.com/httplib2/httplib2/issues/192#issuecomment-993165140
54       "test_client_cert_password_verified"
56       # improper pytest marking
57       "test_head_301"
58       "test_303"
59     ]
60     ++ lib.optionals stdenv.hostPlatform.isDarwin [
61       # fails with "ConnectionResetError: [Errno 54] Connection reset by peer"
62       "test_connection_close"
63       # fails with HTTP 408 Request Timeout, instead of expected 200 OK
64       "test_timeout_subsequent"
65       "test_connection_close"
66     ];
68   pytestFlagsArray = [ "--ignore python2" ];
70   pythonImportsCheck = [ "httplib2" ];
72   meta = with lib; {
73     description = "Comprehensive HTTP client library";
74     homepage = "https://github.com/httplib2/httplib2";
75     license = licenses.mit;
76     maintainers = with maintainers; [ fab ];
77   };