2021-03-18 07:06:36 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-02-13 17:28:30 +00:00
|
|
|
, buildPythonPackage
|
2021-02-13 17:45:46 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
, mock
|
2021-02-13 17:28:30 +00:00
|
|
|
, pyparsing
|
2021-02-13 17:45:46 +00:00
|
|
|
, pytest-forked
|
|
|
|
, pytest-randomly
|
|
|
|
, pytest-timeout
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, six
|
2021-02-13 17:28:30 +00:00
|
|
|
}:
|
2018-05-01 12:24:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httplib2";
|
2021-02-13 17:28:30 +00:00
|
|
|
version = "0.19.0";
|
2018-05-01 12:24:41 +01:00
|
|
|
|
2021-02-13 17:45:46 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "04y2bc2yv3q84llxnafqrciqxjqpxbrd8glbnvvr16c20fwc3r4q";
|
2018-05-01 12:24:41 +01:00
|
|
|
};
|
|
|
|
|
2021-02-13 17:45:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
2021-02-13 17:28:30 +00:00
|
|
|
propagatedBuildInputs = [ pyparsing ];
|
|
|
|
|
2021-02-13 17:45:46 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytest-forked
|
|
|
|
pytest-randomly
|
|
|
|
pytest-timeout
|
|
|
|
pytest-xdist
|
|
|
|
six
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-03-18 07:06:36 +00:00
|
|
|
# Don't run tests for Python 2.7 or Darwin
|
|
|
|
# Nearly 50% of the test suite requires local network access
|
|
|
|
# which isn't allowed on sandboxed Darwin builds
|
|
|
|
doCheck = !(isPy27 || stdenv.isDarwin);
|
2021-02-13 17:45:46 +00:00
|
|
|
pytestFlagsArray = [ "--ignore python2" ];
|
|
|
|
pythonImportsCheck = [ "httplib2" ];
|
2019-02-14 07:37:17 +00:00
|
|
|
|
2018-05-01 12:24:41 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A comprehensive HTTP client library";
|
2021-02-13 17:45:46 +00:00
|
|
|
homepage = "https://httplib2.readthedocs.io";
|
2018-05-01 12:24:41 +01:00
|
|
|
license = licenses.mit;
|
2021-02-13 17:45:46 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2018-05-01 12:24:41 +01:00
|
|
|
};
|
|
|
|
}
|