python3Packages.httplib2: enable tests

This commit is contained in:
Fabian Affolter 2021-02-13 18:45:46 +01:00 committed by Frederik Rietdijk
parent 0ea2aaeee9
commit d247e9f2f8

View File

@ -1,27 +1,53 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, isPy27
, mock
, pyparsing , pyparsing
, pytest-forked
, pytest-randomly
, pytest-timeout
, pytest-xdist
, pytestCheckHook
, six
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "httplib2"; pname = "httplib2";
version = "0.19.0"; version = "0.19.0";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = pname;
sha256 = "sha256-4NQo2tQ8ctvOfRY7d1P/x6OcCX5niO8Q9BmNtpuS8I4="; repo = pname;
rev = "v${version}";
sha256 = "04y2bc2yv3q84llxnafqrciqxjqpxbrd8glbnvvr16c20fwc3r4q";
}; };
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
propagatedBuildInputs = [ pyparsing ]; propagatedBuildInputs = [ pyparsing ];
# Needs setting up checkInputs = [
doCheck = false; 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; { meta = with lib; {
homepage = "https://github.com/httplib2/httplib2";
description = "A comprehensive HTTP client library"; description = "A comprehensive HTTP client library";
homepage = "https://httplib2.readthedocs.io";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ fab ];
}; };
} }