diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/httplib2/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/httplib2/default.nix | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/httplib2/default.nix b/nixpkgs/pkgs/development/python-modules/httplib2/default.nix index b23d501f1e53..ce3b3aa1f671 100644 --- a/nixpkgs/pkgs/development/python-modules/httplib2/default.nix +++ b/nixpkgs/pkgs/development/python-modules/httplib2/default.nix @@ -1,21 +1,53 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy27 +, mock +, pyparsing +, pytest-forked +, pytest-randomly +, pytest-timeout +, pytest-xdist +, pytestCheckHook +, six +}: buildPythonPackage rec { pname = "httplib2"; - version = "0.18.1"; + version = "0.19.0"; - src = fetchPypi { - inherit pname version; - sha256 = "8af66c1c52c7ffe1aa5dc4bcd7c769885254b0756e6e69f953c7f0ab49a70ba3"; + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "04y2bc2yv3q84llxnafqrciqxjqpxbrd8glbnvvr16c20fwc3r4q"; }; - # Needs setting up - doCheck = false; + postPatch = '' + sed -i "/--cov/d" setup.cfg + ''; + + propagatedBuildInputs = [ pyparsing ]; + + checkInputs = [ + mock + pytest-forked + pytest-randomly + pytest-timeout + pytest-xdist + six + pytestCheckHook + ]; + + # Don't run tests for Python 2.7 + doCheck = !isPy27; + pytestFlagsArray = [ "--ignore python2" ]; + pythonImportsCheck = [ "httplib2" ]; meta = with lib; { - homepage = "https://github.com/httplib2/httplib2"; description = "A comprehensive HTTP client library"; + homepage = "https://httplib2.readthedocs.io"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ fab ]; }; } |