dev-python/six: Break if SITEDIR/six is a dir
authorJustin Lecher <jlec@gentoo.org>
Fri, 20 Nov 2015 11:00:44 +0000 (12:00 +0100)
committerJustin Lecher <jlec@gentoo.org>
Fri, 20 Nov 2015 11:29:21 +0000 (12:29 +0100)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=546730

Package-Manager: portage-2.2.25
Signed-off-by: Justin Lecher <jlec@gentoo.org>
dev-python/six/six-1.10.0.ebuild

index 9faef64ea3652bcf4bb800139692098e063cc21f..ed0c5b8e716bb402bf9c0c6ae53e0503ed6c066a 100644 (file)
@@ -26,6 +26,15 @@ PATCHES=(
        "${FILESDIR}"/1.9.0-mapping.patch
        )
 
+pkg_pretend() {
+       six_dir_check() {
+               local dir="${ROOT}"/$(python_get_sitedir)/six
+               [[ -d "${dir}" ]] \
+                       && die "${PN} doesn't work if ${dir} is a directory #546730"
+       }
+       python_foreach_impl six_dir_check
+}
+
 python_prepare_all() {
        # https://bitbucket.org/gutworth/six/issues/139/
        sed \