summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-01-25 13:31:21 -0500
committerMike Gilbert <floppym@gentoo.org>2017-01-25 13:31:21 -0500
commitaeaddcb499d113943310c54d78b015327540d4fc (patch)
tree1e678ad1f29d06e27d6a2884512c12ed5cdfcd88 /dev-python
parent63d2b7a47b78906952d2782fb2bea9a238f6cf9d (diff)
downloadgentoo-aeaddcb499d113943310c54d78b015327540d4fc.tar.gz
gentoo-aeaddcb499d113943310c54d78b015327540d4fc.tar.xz
dev-python/appdirs: support (setuptools -> distutils) egg-info migration
Package-Manager: Portage-2.3.3_p41, Repoman-2.3.1_p34
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/appdirs/appdirs-1.4.0-r1.ebuild13
1 files changed, 13 insertions, 0 deletions
diff --git a/dev-python/appdirs/appdirs-1.4.0-r1.ebuild b/dev-python/appdirs/appdirs-1.4.0-r1.ebuild
index fc2827a2030..76f4d632f75 100644
--- a/dev-python/appdirs/appdirs-1.4.0-r1.ebuild
+++ b/dev-python/appdirs/appdirs-1.4.0-r1.ebuild
@@ -28,3 +28,16 @@ python_test() {
"${PYTHON}" test.py \
|| die "Tests fail with ${EPYTHON}"
}
+
+[[ ${PV} == 1.4.0 ]] || die "Please remove pkg_preinst from the ebuild"
+pkg_preinst() {
+ _remove_egg_info() {
+ local pyver="$("${PYTHON}" -c 'import sys; print(sys.version[:3])')"
+ local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info"
+ if [[ -d ${egginfo} ]]; then
+ einfo "Removing ${egginfo}"
+ rm -r "${egginfo}" || die
+ fi
+ }
+ python_foreach_impl _remove_egg_info
+}