1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 DISTUTILS_USE_SETUPTOOLS=rdepend
12 DESCRIPTION="CherryPy is a pythonic, object-oriented HTTP framework"
13 HOMEPAGE="https://www.cherrypy.org https://pypi.org/project/CherryPy/"
14 SRC_URI="mirror://pypi/C/CherryPy/${MY_P}.tar.gz"
15 S="${WORKDIR}/${MY_P}"
19 KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
22 RDEPEND=">=dev-python/cheroot-8.2.1[${PYTHON_USEDEP}]
23 >=dev-python/portend-2.1.1[${PYTHON_USEDEP}]
24 dev-python/more-itertools[${PYTHON_USEDEP}]
25 dev-python/zc-lockfile[${PYTHON_USEDEP}]
26 dev-python/jaraco-collections[${PYTHON_USEDEP}]
27 ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )"
29 dev-python/setuptools[${PYTHON_USEDEP}]
30 dev-python/setuptools_scm[${PYTHON_USEDEP}]
32 dev-python/routes[${PYTHON_USEDEP}]
33 dev-python/simplejson[${PYTHON_USEDEP}]
34 dev-python/objgraph[${PYTHON_USEDEP}]
35 dev-python/backports-unittest-mock[${PYTHON_USEDEP}]
36 dev-python/path-py[${PYTHON_USEDEP}]
37 dev-python/requests-toolbelt[${PYTHON_USEDEP}]
38 dev-python/pytest-services[${PYTHON_USEDEP}]
43 "${FILESDIR}/cherrypy-18.5.0-tests.patch"
46 distutils_enable_tests pytest
48 python_prepare_all() {
49 # UnicodeEncodeError: 'ascii' codec can't encode character u'\u2603' in position 0: ordinal not in range(128)
50 sed -e 's|@pytest.mark.xfail(py27_on_windows|@pytest.mark.xfail(sys.version_info < (3,)|' \
51 -i cherrypy/test/test_static.py || die
53 sed -r -e '/(pytest-sugar|pytest-cov)/ d' \
56 sed -r -e 's:--cov-report[[:space:]]+[[:graph:]]+::g' \
57 -e 's:--cov[[:graph:]]+::g' \
58 -e 's:--doctest[[:graph:]]+::g' \
61 distutils-r1_python_prepare_all