1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_6} )
11 DESCRIPTION="A utility class for manipulating URLs"
12 HOMEPAGE="https://pypi.org/project/URLObject/"
13 # note: pypi tarball lacks tests
14 # https://github.com/zacharyvoase/urlobject/issues/39
15 SRC_URI="https://github.com/zacharyvoase/urlobject/archive/v${PV}.tar.gz -> ${GITHUB_P}.tar.gz"
18 KEYWORDS="~amd64 ~x86"
21 RESTRICT="!test? ( test )"
24 dev-python/six[${PYTHON_USEDEP}]"
27 dev-python/setuptools[${PYTHON_USEDEP}]
28 test? ( dev-python/nose[${PYTHON_USEDEP}] )
31 S=${WORKDIR}/${GITHUB_P}
33 python_prepare_all() {
34 rm "${S}/urlobject/six.py" || die
35 find "${S}/urlobject" -type f -name \*.py \
36 -exec sed -e 's/from \.six import/from six import/g' -i "{}" \; || die
37 distutils-r1_python_prepare_all
41 nosetests -v || die "Tests fail with ${EPYTHON}"