From aeaddcb499d113943310c54d78b015327540d4fc Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Wed, 25 Jan 2017 13:31:21 -0500 Subject: dev-python/appdirs: support (setuptools -> distutils) egg-info migration Package-Manager: Portage-2.3.3_p41, Repoman-2.3.1_p34 --- dev-python/appdirs/appdirs-1.4.0-r1.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 +} -- cgit v1.2.3-65-gdbad