diff options
author | Matti Picus <matti.picus@gmail.com> | 2022-03-17 14:07:26 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-04-12 06:58:04 -0400 |
commit | 73fa3aad43f0dbda4625f1a57cbb25c8f410979c (patch) | |
tree | 64b4606e1bbcaeb20fa63e7e7d9722fe264f978f /mesonbuild | |
parent | 1bb0387e676bd3775d304ff260604d90cd59508e (diff) | |
download | meson-73fa3aad43f0dbda4625f1a57cbb25c8f410979c.zip meson-73fa3aad43f0dbda4625f1a57cbb25c8f410979c.tar.gz meson-73fa3aad43f0dbda4625f1a57cbb25c8f410979c.tar.bz2 |
python module: windows dll name for pypy needs special casing
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/modules/python.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 000f0c6..1147945 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -186,12 +186,20 @@ class PythonSystemDependency(SystemDependency, _PythonDependencyBase): def _get_windows_link_args(self) -> T.Optional[T.List[str]]: if self.platform.startswith('win'): vernum = self.variables.get('py_version_nodot') + verdot = self.variables.get('py_version_short') + imp_lower = self.variables.get('implementation_lower', 'python') if self.static: libpath = Path('libs') / f'libpython{vernum}.a' else: comp = self.get_compiler() if comp.id == "gcc": - libpath = Path(f'python{vernum}.dll') + if imp_lower == 'pypy' and verdot == '3.8': + # The naming changed between 3.8 and 3.9 + libpath = Path(f'libpypy3-c.dll') + elif imp_lower == 'pypy': + libpath = Path(f'libpypy{verdot}-c.dll') + else: + libpath = Path(f'python{vernum}.dll') else: libpath = Path('libs') / f'python{vernum}.lib' # base_prefix to allow for virtualenvs. |