dev-python/cherrypy: keyworded 18.5.0 for ia64, bug #717946
[gentoo.git] / dev-python / cherrypy / cherrypy-18.5.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 DISTUTILS_USE_SETUPTOOLS=rdepend
8 inherit distutils-r1
9
10 MY_P="CherryPy-${PV}"
11
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}"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~amd64 ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
20 IUSE="ssl test"
21
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}] )"
28 BDEPEND="${RDEPEND}
29         dev-python/setuptools[${PYTHON_USEDEP}]
30         dev-python/setuptools_scm[${PYTHON_USEDEP}]
31         test? (
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}]
39         )
40 "
41
42 PATCHES=(
43         "${FILESDIR}/cherrypy-18.5.0-tests.patch"
44 )
45
46 distutils_enable_tests pytest
47
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
52
53         sed -r -e '/(pytest-sugar|pytest-cov)/ d' \
54                 -i setup.py || die
55
56         sed -r -e 's:--cov-report[[:space:]]+[[:graph:]]+::g' \
57                 -e 's:--cov[[:graph:]]+::g' \
58                 -e 's:--doctest[[:graph:]]+::g' \
59                 -i pytest.ini || die
60
61         distutils-r1_python_prepare_all
62 }