From e2c3247c233876ab090c9ce3d5325a6d46ab350f 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. (From OE-Core rev: 02714c105426b0d687620913c1a7401b386428b6) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../python/python3/setuptweaks.patch | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/setuptweaks.patch (limited to 'meta/recipes-devtools/python/python3/setuptweaks.patch') diff --git a/meta/recipes-devtools/python/python3/setuptweaks.patch b/meta/recipes-devtools/python/python3/setuptweaks.patch deleted file mode 100644 index 3a91b1916c..0000000000 --- a/meta/recipes-devtools/python/python3/setuptweaks.patch +++ /dev/null @@ -1,57 +0,0 @@ -This patch removes various ways native system options can pass into the python -compilation and somehow break C modules. - -Upstream-Status: Inappropriate [OE Specific] - -RP 2012/04/23 - -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py 2012-04-23 20:03:47.295582553 +0000 -+++ Python-2.7.2/setup.py 2012-04-23 20:03:15.000000000 +0000 -@@ -231,7 +231,13 @@ - # compilers - if compiler is not None: - (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS') -- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags -+ # Need to filter out -isysroot from the flags. Ideally should -+ # figure out target flags here. -+ flags = [] -+ for f in cflags.split(): -+ if not f.startswith("-isystem"): -+ flags.append(f) -+ args['compiler_so'] = compiler + ' ' + ccshared + ' ' + ' '.join(flags) - self.compiler.set_executables(**args) - - build_ext.build_extensions(self) -@@ -393,7 +399,6 @@ - # into configure and stored in the Makefile (issue found on OS X 10.3). - for env_var, arg_name, dir_list in ( - ('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 env_val: -@@ -419,16 +424,16 @@ - for directory in reversed(options.dirs): - add_dir_to_list(dir_list, directory) - -- if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+# if os.path.normpath(sys.prefix) != '/usr' \ -+# and not sysconfig.get_config_var('PYTHONFRAMEWORK'): - # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework - # (PYTHONFRAMEWORK is set) to avoid # linking problems when - # building a framework with different architectures than - # the one that is currently installed (issue #7473) -- add_dir_to_list(self.compiler.library_dirs, -- sysconfig.get_config_var("LIBDIR")) -- add_dir_to_list(self.compiler.include_dirs, -- sysconfig.get_config_var("INCLUDEDIR")) -+# add_dir_to_list(self.compiler.library_dirs, -+# sysconfig.get_config_var("LIBDIR")) -+# add_dir_to_list(self.compiler.include_dirs, -+# sysconfig.get_config_var("INCLUDEDIR")) - - try: - have_unicode = unicode -- cgit v1.2.3-54-g00ecf