diff --git a/test/test_c_ext.py b/test/test_c_ext.py index 06ba6d3..f729af7 100644 --- a/test/test_c_ext.py +++ b/test/test_c_ext.py @@ -37,14 +37,22 @@ def inner(code=""): }} """) pytester.makepyfile(setup=f""" + import os + from setuptools import setup, Extension + extra_link_args = [] + # TODO: this should really be per-linker + if os.name == "nt": + extra_link_args.append("/force:unresolved") + setup(name="test", version="0", ext_modules=[ Extension(name="test", sources=["test.c"], - py_limited_api={py_limited_api}), + py_limited_api={py_limited_api}, + extra_link_args=extra_link_args), ]) """) subprocess.run([sys.executable, "setup.py", "build_ext", "-i"],