summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-12-05 17:33:58 -0500
committerMike Gilbert <floppym@gentoo.org>2017-12-05 17:33:58 -0500
commitb5d075527b946da2fa87fd387fa4a8ad15d6e589 (patch)
treefd9a6b712e516723bec1827771a1f696bf5de54d /dev-python/appdirs
parentdev-python/appdirs: fix distutils patch (diff)
downloadgentoo-b5d075527b946da2fa87fd387fa4a8ad15d6e589.tar.gz
gentoo-b5d075527b946da2fa87fd387fa4a8ad15d6e589.tar.bz2
gentoo-b5d075527b946da2fa87fd387fa4a8ad15d6e589.zip
dev-python/appdirs: restore pkg_preinst to clean up egg-info mess
Package-Manager: Portage-2.3.15, Repoman-2.3.6_p7
Diffstat (limited to 'dev-python/appdirs')
-rw-r--r--dev-python/appdirs/appdirs-1.4.3.ebuild13
1 files changed, 13 insertions, 0 deletions
diff --git a/dev-python/appdirs/appdirs-1.4.3.ebuild b/dev-python/appdirs/appdirs-1.4.3.ebuild
index b809f43510ff..4162f84ddb15 100644
--- a/dev-python/appdirs/appdirs-1.4.3.ebuild
+++ b/dev-python/appdirs/appdirs-1.4.3.ebuild
@@ -21,3 +21,16 @@ PATCHES=( "${FILESDIR}"/${PN}-1.4.3-distutils.patch )
python_test() {
"${PYTHON}" test/test_api.py || die "Tests fail with ${EPYTHON}"
}
+
+[[ ${PV} == 1.4.3 ]] || 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
+}