aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-02-15 22:47:37 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-02-22 14:52:02 -0500
commit91c336449561a68f5624692d3c894f2345e466a2 (patch)
treef7b54cd9442336d9d001632658452d6c59a05e08
parentb2bb4573fb54cf4f0c7193a6ab75df64de0eced9 (diff)
downloadmeson-91c336449561a68f5624692d3c894f2345e466a2.zip
meson-91c336449561a68f5624692d3c894f2345e466a2.tar.gz
meson-91c336449561a68f5624692d3c894f2345e466a2.tar.bz2
python dependency: handle broken pylong on many more versions of python
This workaround was never exclusive to python2, and in fact only just got fixed in the upcoming python 3.12 release. Extend the version comparison to cover all those other cases. (cherry picked from commit b4e792f520b2422a3980ea74fbc566c1b332a38d) [backported to apply pre-code move] # Conflicts: # mesonbuild/dependencies/python.py
-rw-r--r--mesonbuild/modules/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 9aa7705..16d3ac4 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -281,7 +281,8 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase):
self.compile_args += ['-I' + path for path in inc_paths if path]
# https://sourceforge.net/p/mingw-w64/mailman/message/30504611/
- if pyarch == '64' and self.major_version == 2:
+ # https://github.com/python/cpython/pull/100137
+ if pyarch == '64' and mesonlib.version_compare(self.version, '<3.12'):
self.compile_args += ['-DMS_WIN64']
self.is_found = True