055f34536aa464a8f6b51ad8c3cfd05b402e9e75
[gentoo.git] / dev-python / pypiserver / pypiserver-1.3.2.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 DISTUTILS_USE_SETUPTOOLS=rdepend
7 PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
8 inherit distutils-r1
9
10 DESCRIPTION="Minimal PyPI server"
11 HOMEPAGE="https://github.com/pypiserver/pypiserver"
12 SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="ZLIB MIT"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc64 ~sparc ~x86"
17 IUSE="test"
18
19 RDEPEND="
20         dev-python/pip[${PYTHON_USEDEP}]
21         >=dev-python/wheel-0.25.0[${PYTHON_USEDEP}]"
22 BDEPEND="
23         dev-python/setuptools-git[${PYTHON_USEDEP}]
24         test? (
25                 ${RDEPEND}
26                 dev-python/passlib[${PYTHON_USEDEP}]
27                 >=dev-python/pytest-2.3[${PYTHON_USEDEP}]
28                 dev-python/twine[${PYTHON_USEDEP}]
29                 dev-python/webtest[${PYTHON_USEDEP}]
30                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2)
31         )"
32
33 DOCS=( README.rst )
34
35 distutils_enable_tests pytest
36
37 src_prepare() {
38         sed -i -e "/tox/d" setup.py || die
39
40         # https://github.com/pypiserver/pypiserver/issues/312
41         sed -e 's:test_root_count:_&:' \
42                 -i tests/test_app.py || die
43         sed -e 's:test_hash_algos:_&:' \
44                 -e 's:test_pipInstall_openOk:_&:' \
45                 -e 's:test_pipInstall_authedOk:_&:' \
46                 -i tests/test_server.py || die
47
48         distutils-r1_src_prepare
49 }