1 |
commit: 051dbce592efbbe452528d2572e85806e89b8529 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 07:24:40 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 07:24:40 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051dbce5 |
7 |
|
8 |
dev-python/six: Run six dir QA check twice |
9 |
|
10 |
Using pkg_pretend to catch as early as possible but don't break when python |
11 |
impl is not installed. Use pkg_Setup to catch them all |
12 |
|
13 |
Package-Manager: portage-2.2.25 |
14 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
15 |
|
16 |
dev-python/six/six-1.10.0.ebuild | 14 ++++++++++++++ |
17 |
1 file changed, 14 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/six/six-1.10.0.ebuild b/dev-python/six/six-1.10.0.ebuild |
20 |
index 6161e0a..ffbb168 100644 |
21 |
--- a/dev-python/six/six-1.10.0.ebuild |
22 |
+++ b/dev-python/six/six-1.10.0.ebuild |
23 |
@@ -26,9 +26,23 @@ PATCHES=( |
24 |
"${FILESDIR}"/1.9.0-mapping.patch |
25 |
) |
26 |
|
27 |
+# Run twice. |
28 |
+# pkg_pretend to catch as early as possible, but be forgiving if |
29 |
+# python impl is not installed allready. |
30 |
+# pkg_setup to catch them all |
31 |
pkg_pretend() { |
32 |
six_dir_check() { |
33 |
local dir="${ROOT}"/$(python_get_sitedir)/six |
34 |
+ type -p "${PYTHON}" > /dev/null || return 0 |
35 |
+ [[ -d "${dir}" ]] \ |
36 |
+ && die "${PN} doesn't work if ${dir} is a directory #546730" |
37 |
+ } |
38 |
+ python_foreach_impl six_dir_check |
39 |
+} |
40 |
+ |
41 |
+pkg_setup() { |
42 |
+ six_dir_check() { |
43 |
+ local dir="${ROOT}"/$(python_get_sitedir)/six |
44 |
[[ -d "${dir}" ]] \ |
45 |
&& die "${PN} doesn't work if ${dir} is a directory #546730" |
46 |
} |