Skip to content

Commit b4e792f

Browse files
committed
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.
1 parent d3148ef commit b4e792f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mesonbuild/dependencies/python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ def __init__(self, name: str, environment: 'Environment',
190190
self.compile_args += ['-I' + path for path in inc_paths if path]
191191

192192
# https://sourceforge.net/p/mingw-w64/mailman/message/30504611/
193-
if mesonlib.is_windows() and self.get_windows_python_arch() == '64' and self.major_version == 2:
193+
# https://github.com/python/cpython/pull/100137
194+
if mesonlib.is_windows() and self.get_windows_python_arch() == '64' and mesonlib.version_compare(self.version, '<3.12'):
194195
self.compile_args += ['-DMS_WIN64']
195196

196197
if not self.clib_compiler.has_header('Python.h', '', environment, extra_args=self.compile_args):

0 commit comments

Comments
 (0)