blob: a25c392270eb46c1359a57365902392c971846a1 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 18 Apr 2019 17:36:11 +0200
4Subject: [PATCH] modules/python.py: do not substitute python's install prefix
5 with meson's
6
7Not sure why this is being done, but it
8a) relies on Python's internal variable substitution which may break in the future
9b) shouldn't be necessary as Python's prefix ought to be correct in the first place
10
11Upstream-Status: Pending
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 mesonbuild/modules/python.py | 7 +++----
15 1 file changed, 3 insertions(+), 4 deletions(-)
16
17diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
18index 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']