diff options
author | Mike Gilbert <floppym@gentoo.org> | 2016-01-27 09:11:44 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2016-01-27 09:11:44 -0500 |
commit | caab06d4a89e612d7d7deef236d5fba61a98e576 (patch) | |
tree | a73fc9bf32d583bf51015a814d9790bf4235c1b6 /dev-python/six | |
parent | a967f3cea856acb65b56c3e37957d99ca662d931 (diff) | |
download | gentoo-caab06d4a89e612d7d7deef236d5fba61a98e576.tar.gz gentoo-caab06d4a89e612d7d7deef236d5fba61a98e576.tar.xz |
dev-python/six: Remove any existing egg-info directory
Bug: https://bugs.gentoo.org/573114
Package-Manager: portage-2.2.27_p49
Diffstat (limited to 'dev-python/six')
-rw-r--r-- | dev-python/six/six-1.10.0.ebuild | 13 | ||||
-rw-r--r-- | dev-python/six/six-1.9.0-r1.ebuild | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/six/six-1.10.0.ebuild b/dev-python/six/six-1.10.0.ebuild index baf5f47fb3a..f0d2eef16da 100644 --- a/dev-python/six/six-1.10.0.ebuild +++ b/dev-python/six/six-1.10.0.ebuild @@ -48,3 +48,16 @@ python_install_all() { use doc && local HTML_DOCS=( documentation/_build/html/ ) distutils-r1_python_install_all } + +pkg_preinst() { + # Remove this in the next version bump + _cleanup() { + local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())") + local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info" + if [[ -d ${egginfo} ]]; then + echo rm -r "${egginfo}" + rm -r "${egginfo}" || die "Failed to remove egg-info directory" + fi + } + python_foreach_impl _cleanup +} diff --git a/dev-python/six/six-1.9.0-r1.ebuild b/dev-python/six/six-1.9.0-r1.ebuild index 7553b1d29d5..de1f0c97c24 100644 --- a/dev-python/six/six-1.9.0-r1.ebuild +++ b/dev-python/six/six-1.9.0-r1.ebuild @@ -39,3 +39,16 @@ python_install_all() { use doc && local HTML_DOCS=( documentation/_build/html/ ) distutils-r1_python_install_all } + +pkg_preinst() { + # Remove this in the next version bump + _cleanup() { + local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())") + local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info" + if [[ -d ${egginfo} ]]; then + echo rm -r "${egginfo}" + rm -r "${egginfo}" || die "Failed to remove egg-info directory" + fi + } + python_foreach_impl _cleanup +} |