From 02714c105426b0d687620913c1a7401b386428b6 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 6 Feb 2019 17:26:34 +0100 Subject: python3: upgrade to 3.7.2 I took the same approach as the recent perl upgrade: write recipe from scratch, taking the pieces from the old recipe only when they were proven to be necessary. The pgo, manifest and ptest features are all preserved. New features: - native and target recipes are now unified into one recipe - check_build_completeness.py runs right after do_compile() and verifies that all optional modules have been built (a notorious source of regressions) - a new approach to sysconfig.py and distutils/sysconfig.py returning values appropriate for native or target builds: we copy the configuration file to a separate folder, add that folder to sys.path (through environment variable that differs between native and target builds), and point python to the file through another environment variable. There were a few other patches where it was difficult to decide if the patch is still relevant, and how to test that it works correctly; please add those as-needed by testing the new python. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...p.py-check-cross_compiling-when-get-FLAGS.patch | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch (limited to 'meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch') diff --git a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch b/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch deleted file mode 100644 index fc2e12dfe5..0000000000 --- a/meta/recipes-devtools/python/python3/setup.py-check-cross_compiling-when-get-FLAGS.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8dad810f3a3d073f09ad72e1a3ee0a895eab2ca1 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Sun, 18 Jan 2015 19:05:36 -0800 -Subject: [PATCH] setup.py:check cross_compiling when get FLAGS - -Fixed when compile target pythnon3: -gcc -isystem/path/to/sysroots/x86_64-linux/usr/include \ - -L=/path/to/sysroots/x86_64-linux/usr/lib - -This is incorrect, the native sysroot should not be used by target -python3. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang ---- - setup.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/setup.py b/setup.py -index e8339cd..83fd31f 100644 ---- a/setup.py -+++ b/setup.py -@@ -238,7 +238,10 @@ class PyBuildExt(build_ext): - # unfortunately, distutils doesn't let us provide separate C and C++ - # compilers - if compiler is not None: -- (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') -+ if cross_compiling: -+ (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '') -+ else: -+ (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') - args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags - self.compiler.set_executables(**args) - -@@ -457,7 +460,10 @@ class PyBuildExt(build_ext): - ('LDFLAGS', '-R', self.compiler.runtime_library_dirs), - ('LDFLAGS', '-L', self.compiler.library_dirs), - ('CPPFLAGS', '-I', self.compiler.include_dirs)): -- env_val = sysconfig.get_config_var(env_var) -+ if cross_compiling: -+ env_val = os.environ.get(env_var) -+ else: -+ env_val = sysconfig.get_config_var(env_var) - if env_val: - # To prevent optparse from raising an exception about any - # options in env_val that it doesn't know about we strip out --- -1.7.9.5 - -- cgit 1.2.3-korg