summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2015-09-12 19:59:55 -0400
committerMike Gilbert <floppym@gentoo.org>2015-09-12 20:01:25 -0400
commitde65dc9655b2a783fd5340a7af2e455ea215c5db (patch)
tree2033d2c755c48a7806fd0fb54449517f261957f7 /eclass
parentnet-misc/openssh: require newer openssl (diff)
downloadgentoo-de65dc9655b2a783fd5340a7af2e455ea215c5db.tar.gz
gentoo-de65dc9655b2a783fd5340a7af2e455ea215c5db.tar.bz2
gentoo-de65dc9655b2a783fd5340a7af2e455ea215c5db.zip
distutils-r1.eclass: mkdir ${BUILD_DIR}/lib
Bug: https://bugs.gentoo.org/559644
Diffstat (limited to 'eclass')
-rw-r--r--eclass/distutils-r1.eclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 3182e98d0376..185dd4fb80e4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -607,6 +607,14 @@ distutils-r1_run_phase() {
fi
local -x PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
+ # Bug 559644
+ # using PYTHONPATH when the ${BUILD_DIR}/lib is not created yet might lead to
+ # problems in setup.py scripts that try to import modules/packages from that path
+ # during the build process (Python at startup evaluates PYTHONPATH, if the dir is
+ # not valid then associates a NullImporter object to ${BUILD_DIR}/lib storing it
+ # in the sys.path_importer_cache)
+ mkdir -p "${BUILD_DIR}/lib" || die
+
# We need separate home for each implementation, for .pydistutils.cfg.
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
local -x HOME=${HOME}/${EPYTHON}