summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httplib2
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-02-13 18:45:46 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2021-02-26 11:02:00 +0100
commitd247e9f2f8c686a5b5be1d4a45107f6efa4c19d1 (patch)
tree1e228a892bee25d6e9622ad26f34ca3dbff13b11 /pkgs/development/python-modules/httplib2
parentpython3Packages.httplib2: 0.18.0 -> 0.19.0 (diff)
downloadnixpkgs-d247e9f2f8c686a5b5be1d4a45107f6efa4c19d1.tar.gz
python3Packages.httplib2: enable tests
Diffstat (limited to 'pkgs/development/python-modules/httplib2')
-rw-r--r--pkgs/development/python-modules/httplib2/default.nix42
1 files changed, 34 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/httplib2/default.nix b/pkgs/development/python-modules/httplib2/default.nix
index 427effad2fb0..ce3b3aa1f671 100644
--- a/pkgs/development/python-modules/httplib2/default.nix
+++ b/pkgs/development/python-modules/httplib2/default.nix
@@ -1,27 +1,53 @@
{ lib
, buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, isPy27
+, mock
, pyparsing
+, pytest-forked
+, pytest-randomly
+, pytest-timeout
+, pytest-xdist
+, pytestCheckHook
+, six
}:
buildPythonPackage rec {
pname = "httplib2";
version = "0.19.0";
- src = fetchPypi {
- inherit pname version;
- sha256 = "sha256-4NQo2tQ8ctvOfRY7d1P/x6OcCX5niO8Q9BmNtpuS8I4=";
+ src = fetchFromGitHub {
+ owner = pname;
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "04y2bc2yv3q84llxnafqrciqxjqpxbrd8glbnvvr16c20fwc3r4q";
};
+ postPatch = ''
+ sed -i "/--cov/d" setup.cfg
+ '';
+
propagatedBuildInputs = [ pyparsing ];
- # Needs setting up
- doCheck = false;
+ 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 ];
};
}