]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-native: update from OE and fix build after staging layout change
authorMarcin Juszkiewicz <hrw@openedhand.com>
Mon, 28 Jul 2008 15:13:20 +0000 (15:13 +0000)
committerMarcin Juszkiewicz <hrw@openedhand.com>
Mon, 28 Jul 2008 15:13:20 +0000 (15:13 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4970 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta-extras/packages/python/python-native-2.5.1/catchup-with-swig.patch [new file with mode: 0644]
meta-extras/packages/python/python-native-2.5.1/fix-staging.patch [new file with mode: 0644]
meta-extras/packages/python/python-native_2.5.1.bb

diff --git a/meta-extras/packages/python/python-native-2.5.1/catchup-with-swig.patch b/meta-extras/packages/python/python-native-2.5.1/catchup-with-swig.patch
new file mode 100644 (file)
index 0000000..f049b75
--- /dev/null
@@ -0,0 +1,13 @@
+Index: Python-2.5.1/Lib/distutils/command/build_ext.py
+===================================================================
+--- Python-2.5.1.orig/Lib/distutils/command/build_ext.py
++++ Python-2.5.1/Lib/distutils/command/build_ext.py
+@@ -513,7 +513,7 @@ class build_ext (Command):
+             target_lang=language)
+-    def swig_sources (self, sources, extension):
++    def swig_sources (self, sources, extension=None):
+         """Walk the list of source files in 'sources', looking for SWIG
+         interface (.i) files.  Run SWIG on all that are found, and
diff --git a/meta-extras/packages/python/python-native-2.5.1/fix-staging.patch b/meta-extras/packages/python/python-native-2.5.1/fix-staging.patch
new file mode 100644 (file)
index 0000000..087c813
--- /dev/null
@@ -0,0 +1,38 @@
+---
+ Lib/distutils/sysconfig.py |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+--- Python-2.5.1.orig/Lib/distutils/sysconfig.py
++++ Python-2.5.1/Lib/distutils/sysconfig.py
+@@ -52,11 +52,14 @@ def get_python_inc(plat_specific=0, pref
+     If 'prefix' is supplied, use it instead of sys.prefix or
+     sys.exec_prefix -- i.e., ignore 'plat_specific'.
+     """
+     if prefix is None:
+-        prefix = plat_specific and EXEC_PREFIX or PREFIX
++        if plat_specific:
++            prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
++        else:
++            prefix = plat_specific and EXEC_PREFIX or PREFIX
+     if os.name == "posix":
+         if python_build:
+             base = os.path.dirname(os.path.abspath(sys.executable))
+             if plat_specific:
+                 inc_dir = base
+@@ -94,11 +97,14 @@ def get_python_lib(plat_specific=0, stan
+     If 'prefix' is supplied, use it instead of sys.prefix or
+     sys.exec_prefix -- i.e., ignore 'plat_specific'.
+     """
+     if prefix is None:
+-        prefix = plat_specific and EXEC_PREFIX or PREFIX
++        if plat_specific:
++            prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib')
++        else:
++            prefix = plat_specific and EXEC_PREFIX or PREFIX
+     if os.name == "posix":
+         libpython = os.path.join(prefix,
+                                  "lib", "python" + get_python_version())
+         if standard_lib:
index ea6e25704389560ccf9956cc2510d912dc8bd802..21e5c7999fdc14c4498fa7d589745759ae8101f6 100644 (file)
@@ -4,15 +4,19 @@ LICENSE = "PSF"
 SECTION = "devel/python"
 PRIORITY = "optional"
 DEPENDS = ""
-PR = "ml1"
+PR = "ml3"
 
 EXCLUDE_FROM_WORLD = "1"
 
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
-           file://bindir-libdir.patch;patch=1 \
-           file://cross-distutils.patch;patch=1 \
-           file://dont-modify-shebang-line.patch;patch=1 \
-           file://default-is-optimized.patch;patch=1"
+SRC_URI = "\
+  http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+  file://bindir-libdir.patch;patch=1 \
+  file://cross-distutils.patch;patch=1 \
+  file://dont-modify-shebang-line.patch;patch=1 \
+  file://default-is-optimized.patch;patch=1 \
+  file://catchup-with-swig.patch;patch=1 \
+  file://fix-staging.patch;patch=1 \
+"
 S = "${WORKDIR}/Python-${PV}"
 
 inherit autotools native
@@ -22,12 +26,8 @@ exec_prefix = "${STAGING_DIR_NATIVE}/${layout_exec_prefix}"
 
 EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \
                 --without-cxx --with-signal-module --with-wctype-functions"
-EXTRA_OEMAKE = 'BUILD_SYS="" HOST_SYS=""'
-
-#do_configure() {
-#      # the autofoo stuff is too old to allow regenerating
-#      oe_runconf
-#}
+EXTRA_OEMAKE = 'BUILD_SYS="" HOST_SYS="" STAGING_LIBDIR=${STAGING_LIBDIR} \
+               STAGING_INCDIR=${STAGING_INCDIR}'
 
 do_stage_append() {
        install -m 0755 Parser/pgen ${STAGING_BINDIR_NATIVE}/