diff options
3 files changed, 63 insertions, 12 deletions
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 index 0000000000..f049b759f4 --- /dev/null +++ b/meta-extras/packages/python/python-native-2.5.1/catchup-with-swig.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | Index: Python-2.5.1/Lib/distutils/command/build_ext.py | ||
| 2 | =================================================================== | ||
| 3 | --- Python-2.5.1.orig/Lib/distutils/command/build_ext.py | ||
| 4 | +++ Python-2.5.1/Lib/distutils/command/build_ext.py | ||
| 5 | @@ -513,7 +513,7 @@ class build_ext (Command): | ||
| 6 | target_lang=language) | ||
| 7 | |||
| 8 | |||
| 9 | - def swig_sources (self, sources, extension): | ||
| 10 | + def swig_sources (self, sources, extension=None): | ||
| 11 | |||
| 12 | """Walk the list of source files in 'sources', looking for SWIG | ||
| 13 | 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 index 0000000000..087c813fd4 --- /dev/null +++ b/meta-extras/packages/python/python-native-2.5.1/fix-staging.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | --- | ||
| 2 | Lib/distutils/sysconfig.py | 10 ++++++++-- | ||
| 3 | 1 file changed, 8 insertions(+), 2 deletions(-) | ||
| 4 | |||
| 5 | --- Python-2.5.1.orig/Lib/distutils/sysconfig.py | ||
| 6 | +++ Python-2.5.1/Lib/distutils/sysconfig.py | ||
| 7 | @@ -52,11 +52,14 @@ def get_python_inc(plat_specific=0, pref | ||
| 8 | |||
| 9 | If 'prefix' is supplied, use it instead of sys.prefix or | ||
| 10 | sys.exec_prefix -- i.e., ignore 'plat_specific'. | ||
| 11 | """ | ||
| 12 | if prefix is None: | ||
| 13 | - prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
| 14 | + if plat_specific: | ||
| 15 | + prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include') | ||
| 16 | + else: | ||
| 17 | + prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
| 18 | if os.name == "posix": | ||
| 19 | if python_build: | ||
| 20 | base = os.path.dirname(os.path.abspath(sys.executable)) | ||
| 21 | if plat_specific: | ||
| 22 | inc_dir = base | ||
| 23 | @@ -94,11 +97,14 @@ def get_python_lib(plat_specific=0, stan | ||
| 24 | |||
| 25 | If 'prefix' is supplied, use it instead of sys.prefix or | ||
| 26 | sys.exec_prefix -- i.e., ignore 'plat_specific'. | ||
| 27 | """ | ||
| 28 | if prefix is None: | ||
| 29 | - prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
| 30 | + if plat_specific: | ||
| 31 | + prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip('lib') | ||
| 32 | + else: | ||
| 33 | + prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
| 34 | |||
| 35 | if os.name == "posix": | ||
| 36 | libpython = os.path.join(prefix, | ||
| 37 | "lib", "python" + get_python_version()) | ||
| 38 | if standard_lib: | ||
diff --git a/meta-extras/packages/python/python-native_2.5.1.bb b/meta-extras/packages/python/python-native_2.5.1.bb index ea6e257043..21e5c7999f 100644 --- a/meta-extras/packages/python/python-native_2.5.1.bb +++ b/meta-extras/packages/python/python-native_2.5.1.bb | |||
| @@ -4,15 +4,19 @@ LICENSE = "PSF" | |||
| 4 | SECTION = "devel/python" | 4 | SECTION = "devel/python" |
| 5 | PRIORITY = "optional" | 5 | PRIORITY = "optional" |
| 6 | DEPENDS = "" | 6 | DEPENDS = "" |
| 7 | PR = "ml1" | 7 | PR = "ml3" |
| 8 | 8 | ||
| 9 | EXCLUDE_FROM_WORLD = "1" | 9 | EXCLUDE_FROM_WORLD = "1" |
| 10 | 10 | ||
| 11 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ | 11 | SRC_URI = "\ |
| 12 | file://bindir-libdir.patch;patch=1 \ | 12 | http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \ |
| 13 | file://cross-distutils.patch;patch=1 \ | 13 | file://bindir-libdir.patch;patch=1 \ |
| 14 | file://dont-modify-shebang-line.patch;patch=1 \ | 14 | file://cross-distutils.patch;patch=1 \ |
| 15 | file://default-is-optimized.patch;patch=1" | 15 | file://dont-modify-shebang-line.patch;patch=1 \ |
| 16 | file://default-is-optimized.patch;patch=1 \ | ||
| 17 | file://catchup-with-swig.patch;patch=1 \ | ||
| 18 | file://fix-staging.patch;patch=1 \ | ||
| 19 | " | ||
| 16 | S = "${WORKDIR}/Python-${PV}" | 20 | S = "${WORKDIR}/Python-${PV}" |
| 17 | 21 | ||
| 18 | inherit autotools native | 22 | inherit autotools native |
| @@ -22,12 +26,8 @@ exec_prefix = "${STAGING_DIR_NATIVE}/${layout_exec_prefix}" | |||
| 22 | 26 | ||
| 23 | EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \ | 27 | EXTRA_OECONF = "--with-threads --with-pymalloc --with-cyclic-gc \ |
| 24 | --without-cxx --with-signal-module --with-wctype-functions" | 28 | --without-cxx --with-signal-module --with-wctype-functions" |
| 25 | EXTRA_OEMAKE = 'BUILD_SYS="" HOST_SYS=""' | 29 | EXTRA_OEMAKE = 'BUILD_SYS="" HOST_SYS="" STAGING_LIBDIR=${STAGING_LIBDIR} \ |
| 26 | 30 | STAGING_INCDIR=${STAGING_INCDIR}' | |
| 27 | #do_configure() { | ||
| 28 | # # the autofoo stuff is too old to allow regenerating | ||
| 29 | # oe_runconf | ||
| 30 | #} | ||
| 31 | 31 | ||
| 32 | do_stage_append() { | 32 | do_stage_append() { |
| 33 | install -m 0755 Parser/pgen ${STAGING_BINDIR_NATIVE}/ | 33 | install -m 0755 Parser/pgen ${STAGING_BINDIR_NATIVE}/ |
