Skip to contentSkip to conversation

python3: Revert python-config to distutils.sysconfig

RFC PATCH New Tyler Hall 1 participant 1 message May 5, 2014

lore
Share & tools
lore

Tyler Hall

author
#0 lore raw

RFC PATCH 1/1 python3: Revert python-config to distutils.sysconfig

The newer sysconfig module shares some code with distutils.sysconfig, but the same modifications as in

12-distutils-prefix-is-inside-staging-area.patch

makes distutils.sysconfig affect the native runtime as well as cross building. Use the old, patched implementation which returns paths in the staging directory and for the target, as appropriate.

This change reverts this upstream patch
http://hg.python.org/cpython/diff/712970b019f7/Misc/python-config.in

---

Right now, python3-config returns paths in the native sysroot regardless of whether the recipe is native or cross. This will cause cross compiled C python modules to use native headers.

I tried making a similar change in the new sysconfig module as in the referenced distutils.sysconfig patch above, but that broke autotools' ability to detect the native python3 correctly.

I think making python3-config get its info from distutils will work for now, but since this distutils interface appears to be deprecated it will probably have to be revisted later.

 .../python/python3-native_3.3.3.bb                 |  1 +
 .../python/python3/python-config.patch             | 46 ++++++++++++++++++++++
 meta/recipes-devtools/python/python3_3.3.3.bb      |  1 +
 3 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/python-config.patch
meta/recipes-devtools/python/python3-native_3.3.3.bb +1 -0
index 0fd7349..9ae2a0b 100644
@@ -6,6 +6,7 @@ DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
 file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
 file://000-cross-compile.patch \
 file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
meta/recipes-devtools/python/python3/python-config.patch new file +46 -0

46 lines not on this page · raw message

meta/recipes-devtools/python/python3_3.3.3.bb +1 -0
index 2dd5116..fe9824c 100644
@@ -8,6 +8,7 @@ DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
 file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
 file://000-cross-compile.patch \
 file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
Signature · 1 line
1.9.2