You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In dependencies/python.py:PythonSystemDependency::get_windows_link_args(), the link library will always be pythonxy.lib where xy is 311. But when building a c-extension using the limited api (i.e. -DPy_LIMITED_API=0x03060000) the name should be python3.lib
To Reproduce
This is from PR numpy/numpy#24206 where I am converting an existing test that uses setup.py to meson.
project('limited_api', 'c', 'cython')
py_mod = import('python')
py3 = py_mod.find_installation(pure: false)
cc = meson.get_compiler('c')
npy_include_path = run_command(py3, ['-c',
'import os; os.chdir(".."); import numpy; print(os.path.abspath(numpy.get_include()))'],
check: true).stdout().strip()
py3.extension_module(
'limited_api',
'limited_api.c',
install: false,
c_args: [
'-DNPY_NO_DEPRECATED_API=0', # Cython still uses old NumPy C API
'-DPy_LIMITED_API=0x03060000',
],
include_directories: [npy_include_path],
)
Expected behavior
There should be a way to tell meson to build limited_api c-extensions.
system parameters
Is this a cross build or just a plain native build (for the same computer)? native build
what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.) windows
what Python version are you using e.g. 3.8.0 3.11
what meson --versionlatest
what ninja --version if it's a Ninja build from PyPI
The text was updated successfully, but these errors were encountered:
Describe the bug
In
dependencies/python.py:PythonSystemDependency::get_windows_link_args()
, the link library will always bepythonxy.lib
wherexy
is311
. But when building a c-extension using the limited api (i.e.-DPy_LIMITED_API=0x03060000
) the name should bepython3.lib
To Reproduce
This is from PR numpy/numpy#24206 where I am converting an existing test that uses setup.py to meson.
Expected behavior
There should be a way to tell meson to build limited_api c-extensions.
system parameters
meson --version
latestninja --version
if it's a Ninja build from PyPIThe text was updated successfully, but these errors were encountered: