mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-31 23:08:09 -07:00
dev-python/appdirs: restore pkg_preinst to clean up egg-info mess
Package-Manager: Portage-2.3.15, Repoman-2.3.6_p7
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user