diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-02-15 22:47:37 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-02-22 10:32:09 -0800 |
commit | 81a8c488f007e842e83aa16ba941877250430a15 (patch) | |
tree | 2ea872ab6cfe6b3bcd7522f6ff6204af761dbc34 | |
parent | 456d8962f3a8097ce8c2576ad5e345c3ff510fa2 (diff) | |
download | meson-81a8c488f007e842e83aa16ba941877250430a15.zip meson-81a8c488f007e842e83aa16ba941877250430a15.tar.gz meson-81a8c488f007e842e83aa16ba941877250430a15.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.
-rw-r--r-- | mesonbuild/dependencies/python.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py index 6b68d11..5c04c62 100644 --- a/mesonbuild/dependencies/python.py +++ b/mesonbuild/dependencies/python.py @@ -190,7 +190,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 mesonlib.is_windows() and self.get_windows_python_arch() == '64' and self.major_version == 2: + # https://github.com/python/cpython/pull/100137 + if mesonlib.is_windows() and self.get_windows_python_arch() == '64' and mesonlib.version_compare(self.version, '<3.12'): self.compile_args += ['-DMS_WIN64'] if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args): |