diff options
author | Mike Gilbert <floppym@gentoo.org> | 2017-01-25 13:31:21 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2017-01-25 13:31:21 -0500 |
commit | aeaddcb499d113943310c54d78b015327540d4fc (patch) | |
tree | 1e678ad1f29d06e27d6a2884512c12ed5cdfcd88 | |
parent | media-video/ffmpegthumbnailer-2.2.0-r0: stable on alpha (diff) | |
download | gentoo-aeaddcb499d113943310c54d78b015327540d4fc.tar.gz gentoo-aeaddcb499d113943310c54d78b015327540d4fc.tar.bz2 gentoo-aeaddcb499d113943310c54d78b015327540d4fc.zip |
dev-python/appdirs: support (setuptools -> distutils) egg-info migration
Package-Manager: Portage-2.3.3_p41, Repoman-2.3.1_p34
-rw-r--r-- | dev-python/appdirs/appdirs-1.4.0-r1.ebuild | 13 |
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 fc2827a2030a..76f4d632f75a 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 +} |