1 |
commit: caab06d4a89e612d7d7deef236d5fba61a98e576 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 27 14:11:44 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 27 14:11:44 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caab06d4 |
7 |
|
8 |
dev-python/six: Remove any existing egg-info directory |
9 |
|
10 |
Bug: https://bugs.gentoo.org/573114 |
11 |
|
12 |
Package-Manager: portage-2.2.27_p49 |
13 |
|
14 |
dev-python/six/six-1.10.0.ebuild | 13 +++++++++++++ |
15 |
dev-python/six/six-1.9.0-r1.ebuild | 13 +++++++++++++ |
16 |
2 files changed, 26 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/six/six-1.10.0.ebuild b/dev-python/six/six-1.10.0.ebuild |
19 |
index baf5f47..f0d2eef 100644 |
20 |
--- a/dev-python/six/six-1.10.0.ebuild |
21 |
+++ b/dev-python/six/six-1.10.0.ebuild |
22 |
@@ -48,3 +48,16 @@ python_install_all() { |
23 |
use doc && local HTML_DOCS=( documentation/_build/html/ ) |
24 |
distutils-r1_python_install_all |
25 |
} |
26 |
+ |
27 |
+pkg_preinst() { |
28 |
+ # Remove this in the next version bump |
29 |
+ _cleanup() { |
30 |
+ local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())") |
31 |
+ local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info" |
32 |
+ if [[ -d ${egginfo} ]]; then |
33 |
+ echo rm -r "${egginfo}" |
34 |
+ rm -r "${egginfo}" || die "Failed to remove egg-info directory" |
35 |
+ fi |
36 |
+ } |
37 |
+ python_foreach_impl _cleanup |
38 |
+} |
39 |
|
40 |
diff --git a/dev-python/six/six-1.9.0-r1.ebuild b/dev-python/six/six-1.9.0-r1.ebuild |
41 |
index 7553b1d..de1f0c9 100644 |
42 |
--- a/dev-python/six/six-1.9.0-r1.ebuild |
43 |
+++ b/dev-python/six/six-1.9.0-r1.ebuild |
44 |
@@ -39,3 +39,16 @@ python_install_all() { |
45 |
use doc && local HTML_DOCS=( documentation/_build/html/ ) |
46 |
distutils-r1_python_install_all |
47 |
} |
48 |
+ |
49 |
+pkg_preinst() { |
50 |
+ # Remove this in the next version bump |
51 |
+ _cleanup() { |
52 |
+ local pyver=$("${PYTHON}" -c "from distutils.sysconfig import get_python_version; print(get_python_version())") |
53 |
+ local egginfo="${ROOT%/}$(python_get_sitedir)/${P}-py${pyver}.egg-info" |
54 |
+ if [[ -d ${egginfo} ]]; then |
55 |
+ echo rm -r "${egginfo}" |
56 |
+ rm -r "${egginfo}" || die "Failed to remove egg-info directory" |
57 |
+ fi |
58 |
+ } |
59 |
+ python_foreach_impl _cleanup |
60 |
+} |