2018-07-30 05:50:54 +00:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, fetchpatch
|
2017-12-24 04:00:12 +00:00
|
|
|
, more-itertools, six
|
2018-04-20 11:08:45 +00:00
|
|
|
, pytest, pytestcov, portend
|
2018-06-28 07:35:58 +00:00
|
|
|
, backports_unittest-mock
|
|
|
|
, backports_functools_lru_cache }:
|
2017-09-05 09:16:41 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cheroot";
|
2018-07-22 10:06:25 +00:00
|
|
|
version = "6.3.3";
|
2017-09-05 09:16:41 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 10:06:25 +00:00
|
|
|
sha256 = "8e3ac15e1efffc81425a693e99b3c09d7ea4bf947255d8d4c38e2cf76f3a4d25";
|
2017-09-05 09:16:41 +00:00
|
|
|
};
|
|
|
|
|
2018-07-30 05:50:54 +00:00
|
|
|
patches = fetchpatch {
|
|
|
|
name = "cheroot-fix-setup-python3.patch";
|
2018-09-25 18:20:57 +00:00
|
|
|
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/cheroot-fix-setup-python3.patch?h=packages/python-cheroot&id=9b33cb0885b3c0d91adeacae23761a4321eb0e64";
|
2018-07-30 05:50:54 +00:00
|
|
|
sha256 = "1rlgz0qln536y00mfqlf0i9hz3f53id73wh47cg5q2vcsw1w2bpc";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ more-itertools six backports_functools_lru_cache ];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2018-07-30 05:50:54 +00:00
|
|
|
checkInputs = [ pytest pytestcov portend backports_unittest-mock ];
|
2017-12-24 04:00:12 +00:00
|
|
|
|
2018-06-28 07:35:58 +00: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 09:16:41 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test cheroot
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "High-performance, pure-Python HTTP";
|
|
|
|
homepage = https://github.com/cherrypy/cheroot;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|