diff options
Diffstat (limited to 'external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch')
-rw-r--r-- | external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch new file mode 100644 index 00000000..985fc36c --- /dev/null +++ b/external/meta-openembedded/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs/0004-do-not-create-python-environment.patch @@ -0,0 +1,64 @@ +From 5028d1cd669c179ed49061316d04c8e8862a5bd8 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 12 Jul 2018 15:04:47 +0800 +Subject: [PATCH 1/5] do not create python environment + +Use oe's python environment rather than create one of host + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Rebase to 60.9.0 (firefox-esr sources) +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + build/moz.configure/init.configure | 18 ------------------ + configure.py | 10 +++++++++- + 3 files changed, 11 insertions(+), 21 deletions(-) + +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -250,24 +250,6 @@ def virtualenv_python(env_python, build_ + else: + python = sys.executable + +- if not manager.up_to_date(python): +- log.info('Creating Python environment') +- manager.build(python) +- +- python = normsep(manager.python_path) +- +- if python != normsep(sys.executable): +- log.info('Reexecuting in the virtualenv') +- if env_python: +- del os.environ['PYTHON'] +- # One would prefer to use os.execl, but that's completely borked on +- # Windows. +- sys.exit(subprocess.call([python] + sys.argv)) +- +- # We are now in the virtualenv +- if not distutils.sysconfig.get_python_lib(): +- die('Could not determine python site packages directory') +- + return python + + +--- a/configure.py ++++ b/configure.py +@@ -12,7 +12,15 @@ import textwrap + + + base_dir = os.path.abspath(os.path.dirname(__file__)) +-sys.path.insert(0, os.path.join(base_dir, 'python', 'mozbuild')) ++sys.path.insert(0, os.path.join(base_dir, 'config')) ++def get_immediate_subdirectories(a_dir): ++ return [name for name in os.listdir(a_dir) ++ if os.path.isdir(os.path.join(a_dir, name))] ++for s in ["python", "testing/mozbase"]: ++ sub_dir = os.path.join(base_dir, s) ++ for module_dir in get_immediate_subdirectories(sub_dir): ++ sys.path.insert(0, os.path.join(sub_dir, module_dir)) ++ + from mozbuild.configure import ConfigureSandbox + from mozbuild.makeutil import Makefile + from mozbuild.pythonutil import iter_modules_in_path |