Skip to content

Commit f4fe157

Browse files
committed
tests: add support for running on Windows
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 3c80efb commit f4fe157

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test = [
3131
'pytest-cov >= 5',
3232
'pytest-github-actions-annotate-failures',
3333
'environment-helpers >= 0.2.0',
34-
'patchelf',
34+
'patchelf; os_name == "nt"',
3535
]
3636

3737
[project.urls]

tests/test_hook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ def test_header_only_library(env, tmp_path, packages, monkeypatch):
1818
env.install_wheel(wheel)
1919

2020
# Remove rpath, as meson insists on setting it
21-
uses_library_path = os.path.join(env.scheme['platlib'], 'uses_library.cpython-313-x86_64-linux-gnu.so')
22-
subprocess.check_call(['patchelf', '--remove-rpath', uses_library_path])
21+
if os.name == 'posix':
22+
uses_library_path = os.path.join(env.scheme['platlib'], 'uses_library.cpython-313-x86_64-linux-gnu.so')
23+
subprocess.check_call(['patchelf', '--remove-rpath', uses_library_path])
2324

2425
# Make sure uses_library.foo() works
2526
assert env.introspectable.call('uses_library.foo', 1, 2) == 3

0 commit comments

Comments
 (0)