3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/httplib2/default.nix
Sergei Trofimovich ae842d0f74 python3Packages.httplib2: drop upstreamed patch (fails to apply)
```
$ nix build -f.  python3Packages.httplib2 -L
...
python3.9-httplib2> patching sources
python3.9-httplib2> applying patch /nix/store/gbpay7j261cbshpnkfgvp3lbnwa41p89-08d6993b69256fbc6c0b1c615c24910803c4d610.patch
python3.9-httplib2> patching file tests/test_http.py
python3.9-httplib2> Reversed (or previously applied) patch detected!  Assume -R? [n]
python3.9-httplib2> Apply anyway? [n]
python3.9-httplib2> Skipping patch.
python3.9-httplib2> 1 out of 1 hunk ignored -- saving rejects to file tests/test_http.py.rej
```
2021-10-30 18:16:11 +01:00

62 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, isPy27
, mock
, pyparsing
, pytest-forked
, pytest-randomly
, pytest-timeout
, pytest-xdist
, pytestCheckHook
, six
}:
buildPythonPackage rec {
pname = "httplib2";
version = "0.20.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-1zqs3YRVtm5DwewETLtRg5XhMJPJsMi0QLfeGirOURs=";
};
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
propagatedBuildInputs = [ pyparsing ];
pythonImportsCheck = [ "httplib2" ];
# Don't run tests for Python 2.7
doCheck = !isPy27;
checkInputs = [
mock
pytest-forked
pytest-randomly
pytest-timeout
pytest-xdist
six
pytestCheckHook
];
disabledTests = lib.optionals (stdenv.isDarwin) [
# fails with HTTP 408 Request Timeout, instead of expected 200 OK
"test_timeout_subsequent"
];
pytestFlagsArray = [ "--ignore python2" ];
meta = with lib; {
description = "A comprehensive HTTP client library";
homepage = "https://httplib2.readthedocs.io";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}