dev-python/URLObject: Removed boundled six
authorSlawomir Lis <slis@gentoo.org>
Fri, 16 Aug 2019 05:21:25 +0000 (07:21 +0200)
committerSlawomir Lis <slis@gentoo.org>
Fri, 16 Aug 2019 05:21:38 +0000 (07:21 +0200)
Closes: https://bugs.gentoo.org/616082
Package-Manager: Portage-2.3.71, Repoman-2.3.16
Signed-off-by: Slawek Lis <slis@gentoo.org>
dev-python/URLObject/URLObject-2.4.3.ebuild

index b628b00bb7812fb4ca64e2ec46d378ffeed81c1b..52b54f19514b52fb9e33ac6ade9150bdf7fd8abd 100644 (file)
@@ -19,7 +19,8 @@ KEYWORDS="~amd64 ~x86"
 SLOT="0"
 IUSE="test"
 
-RDEPEND=""
+RDEPEND="
+       dev-python/six[${PYTHON_USEDEP}]"
 DEPEND="
        ${RDEPEND}
        dev-python/setuptools[${PYTHON_USEDEP}]
@@ -28,6 +29,13 @@ DEPEND="
 
 S=${WORKDIR}/${GITHUB_P}
 
+python_prepare_all() {
+       rm "${S}/urlobject/six.py" || die
+       find "${S}/urlobject" -type f -name \*.py \
+               -exec sed -e 's/from \.six import/from six import/g' -i "{}" \; || die
+       distutils-r1_python_prepare_all
+}
+
 python_test() {
        nosetests -v || die "Tests fail with ${EPYTHON}"
 }