Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion python/cpp/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} --exclud
[tool.cibuildwheel.windows]
archs = "AMD64"
skip = "*win32 *arm64"

{% if add_c_abi -%}
# The C ABI library ships inside the wheel; delvewheel must not look for it on PATH.
repair-wheel-command = "delvewheel repair --exclude lib{{ module }}.dll -w {dest_dir} {wheel}"
{% endif %}
{% if add_pyodide -%}
[tool.cibuildwheel.pyodide]
test-command = "python -m pytest -vvv --pyargs {{ module }}.tests"
Expand Down
4 changes: 3 additions & 1 deletion python/cpp/{{module}}/tests/test_all.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ def test_c_consumer_builds_against_the_installed_package(tmp_path):
source.write_text(C_CONSUMER)
executable = tmp_path / ("consumer.exe" if platform == "win32" else "consumer")
env = dict(os.environ)
if platform == "win32":
# Windows has no rpath, so the program finds the DLL through PATH whichever compiler built it.
env["PATH"] = library_dir + os.pathsep + env["PATH"]
if Path(compiler).stem.lower() == "cl":
command = [compiler, "/nologo", f"/I{get_include()}", str(source), f"/Fe:{executable}", "/link", f"/LIBPATH:{library_dir}", f"{library}.lib"]
env["PATH"] = library_dir + os.pathsep + env["PATH"]
else:
command = [
compiler,
Expand Down
Loading