diff options
Diffstat (limited to 'meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch')
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch new file mode 100644 index 0000000000..a25c392270 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 18 Apr 2019 17:36:11 +0200 | ||
4 | Subject: [PATCH] modules/python.py: do not substitute python's install prefix | ||
5 | with meson's | ||
6 | |||
7 | Not sure why this is being done, but it | ||
8 | a) relies on Python's internal variable substitution which may break in the future | ||
9 | b) shouldn't be necessary as Python's prefix ought to be correct in the first place | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | mesonbuild/modules/python.py | 7 +++---- | ||
15 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | ||
18 | index 6e2c63b..f5a37ac 100644 | ||
19 | --- a/mesonbuild/modules/python.py | ||
20 | +++ b/mesonbuild/modules/python.py | ||
21 | @@ -254,7 +254,7 @@ import sysconfig | ||
22 | import json | ||
23 | import sys | ||
24 | |||
25 | -install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''}) | ||
26 | +install_paths = sysconfig.get_paths(scheme='posix_prefix') | ||
27 | |||
28 | def links_against_libpython(): | ||
29 | from distutils.core import Distribution, Extension | ||
30 | @@ -279,12 +279,11 @@ class PythonInstallation(ExternalProgramHolder): | ||
31 | ExternalProgramHolder.__init__(self, python) | ||
32 | self.interpreter = interpreter | ||
33 | self.subproject = self.interpreter.subproject | ||
34 | - prefix = self.interpreter.environment.coredata.get_builtin_option('prefix') | ||
35 | self.variables = info['variables'] | ||
36 | self.paths = info['paths'] | ||
37 | install_paths = info['install_paths'] | ||
38 | - self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:]) | ||
39 | - self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:]) | ||
40 | + self.platlib_install_path = install_paths['platlib'] | ||
41 | + self.purelib_install_path = install_paths['purelib'] | ||
42 | self.version = info['version'] | ||
43 | self.platform = info['platform'] | ||
44 | self.is_pypy = info['is_pypy'] | ||