2017-09-05 10:16:41 +01:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage
|
2017-12-24 04:00:12 +00:00
|
|
|
, more-itertools, six
|
2018-04-20 12:08:45 +01:00
|
|
|
, pytest, pytestcov, portend
|
2018-06-28 08:35:58 +01:00
|
|
|
, backports_unittest-mock
|
|
|
|
, backports_functools_lru_cache }:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2018-06-21 06:37:16 +01:00
|
|
|
version = "6.3.2";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-06-21 06:37:16 +01:00
|
|
|
sha256 = "52f915d077ce6201e59c95c4a2ef89617d9b90e6185defb40c03ff3515d2066f";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2017-12-24 04:00:12 +00:00
|
|
|
propagatedBuildInputs = [ more-itertools six ];
|
|
|
|
|
2018-06-28 08:35:58 +01:00
|
|
|
checkInputs = [ pytest pytestcov portend backports_unittest-mock backports_functools_lru_cache ];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2018-06-28 08:35:58 +01:00
|
|
|
# Disable testmon, it needs pytest-testmon, which we do not currently have in nikpkgs,
|
|
|
|
# and is only used to skip some tests that are already known to work.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "./pytest.ini" --replace "--testmon" ""
|
|
|
|
substituteInPlace setup.py --replace "use_scm_version=True" "version=\"${version}\"" \
|
|
|
|
--replace "'setuptools_scm>=1.15.0'," "" \
|
|
|
|
--replace "'setuptools_scm_git_archive>=1.0'," "" \
|
|
|
|
'';
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test cheroot
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "High-performance, pure-Python HTTP";
|
|
|
|
homepage = https://github.com/cherrypy/cheroot;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|