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.
pull/11250/head
Eli Schwartz 2 years ago committed by Dylan Baker
parent 456d8962f3
commit 81a8c488f0
  1. 3
      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):

Loading…
Cancel
Save