Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 1 | From 214e559d394491b1376e4cc370f75151117a3f83 Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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> |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 13 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | --- |
| 15 | mesonbuild/modules/python.py | 7 +++---- |
| 16 | 1 file changed, 3 insertions(+), 4 deletions(-) |
| 17 | |
| 18 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 19 | index 2f0c644..d2aa565 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 20 | --- a/mesonbuild/modules/python.py |
| 21 | +++ b/mesonbuild/modules/python.py |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 22 | @@ -251,7 +251,7 @@ INTROSPECT_COMMAND = '''import sysconfig |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 23 | import json |
| 24 | import sys |
| 25 | |
| 26 | -install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''}) |
| 27 | +install_paths = sysconfig.get_paths(scheme='posix_prefix') |
| 28 | |
| 29 | def links_against_libpython(): |
| 30 | from distutils.core import Distribution, Extension |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame^] | 31 | @@ -276,12 +276,11 @@ class PythonInstallation(ExternalProgramHolder): |
| 32 | ExternalProgramHolder.__init__(self, python, interpreter.subproject) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 33 | self.interpreter = interpreter |
| 34 | self.subproject = self.interpreter.subproject |
| 35 | - prefix = self.interpreter.environment.coredata.get_builtin_option('prefix') |
| 36 | self.variables = info['variables'] |
| 37 | self.paths = info['paths'] |
| 38 | install_paths = info['install_paths'] |
| 39 | - self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:]) |
| 40 | - self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:]) |
| 41 | + self.platlib_install_path = install_paths['platlib'] |
| 42 | + self.purelib_install_path = install_paths['purelib'] |
| 43 | self.version = info['version'] |
| 44 | self.platform = info['platform'] |
| 45 | self.is_pypy = info['is_pypy'] |