kumquat-buildroot/package/python3
Thomas Petazzoni d3c6db3622 python3: remove target Python packages from PYTHONPATH
This commit is similar to 350941e31d
("python: remove target Python packages from PYTHONPATH") but for
python3.

We currently have
$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
inside the PYTHON3_PATH variable, which gets used to define
PYTHONPATH, passed to the host Python interpreter when
building/installing target packages.

However, this is terribly wrong, as it causes the host interpreter to
potentially import target Python packages. This is wrong for several
reasons:

 - Some Python packages might need some Python modules to be installed
   on the host (described in setup_requires in setup.py), but their
   installation currently works because by luck the corresponding
   Python module is installed for the target. Some of those cases were
   happening for real, and fixed by previous patches.

 - Some Python packages include some native code, therefore built for
   a specific CPU architecture. When you point the host Python
   interpreter to native libraries built for the target, you get nice
   build failures, such as the one affecting the python-cffi related
   packages.

This change fixes the following build failures:

   http://autobuild.buildroot.net/results/9005b89407e46b537a54cac6cc0c69dcac4dc5ea/
   (python-cryptography)

   http://autobuild.buildroot.net/results/395682d33d02fdcaa39d3c0326355bd9ea3d6feb/
   (python-pynacl)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-08-21 23:25:03 +02:00
..
0001-Make-the-build-of-pyc-files-conditional.patch
0002-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch
0003-Add-infrastructure-to-disable-the-build-of-certain-e.patch
0004-Adjust-library-header-paths-for-cross-compilation.patch
0005-Don-t-look-in-usr-lib-termcap-for-libraries.patch
0006-Don-t-add-multiarch-paths.patch
0007-Abort-on-failed-module-build.patch
0008-Serial-ioctl-workaround.patch
0009-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
0010-Misc-python-config.sh.in-ensure-sed-invocations-only.patch
0011-Override-system-locale-and-set-to-default-when-addin.patch
0012-Add-importlib-fix-for-PEP-3147-issue.patch
0013-Add-an-option-to-disable-installation-of-test-module.patch
0014-Add-an-option-to-disable-pydoc.patch
0015-Add-an-option-to-disable-lib2to3.patch
0016-Add-option-to-disable-the-sqlite3-module.patch
0017-Add-an-option-to-disable-the-tk-module.patch
0018-Add-an-option-to-disable-the-curses-module.patch
0019-Add-an-option-to-disable-expat.patch
0020-Add-an-option-to-disable-CJK-codecs.patch
0021-Add-an-option-to-disable-NIS.patch
0022-Add-an-option-to-disable-unicodedata.patch
0023-Add-an-option-to-disable-IDLE.patch
0024-Add-an-option-to-disable-decimal.patch
0025-Add-an-option-to-disable-the-ossaudiodev-module.patch
0026-Support-PGEN_FOR_BUILD-and-FREEZE_IMPORTLIB_FOR_BUIL.patch
0027-Add-an-option-to-disable-openssl-support.patch
0028-Add-an-option-to-disable-the-readline-module.patch
0029-Add-options-to-disable-zlib-bzip2-and-xz-modules.patch
Config.in
python3.hash
python3.mk