Skip to content

Commit b2fe885

Browse files
committed
tests: fix tests on macOS
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent cba03e8 commit b2fe885

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
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; os_name == "nt"',
34+
'patchelf; sys_platform == "linux"',
3535
]
3636

3737
[project.urls]

tests/test_hook.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import subprocess
3+
import sys
34
import sysconfig
45

56
import pytest
@@ -19,7 +20,7 @@ def test_header_only_library(env, tmp_path, packages, monkeypatch):
1920
env.install_wheel(wheel)
2021

2122
# Remove rpath, as meson insists on setting it
22-
if os.name == 'posix':
23+
if sys.platform == 'linux':
2324
uses_library_path = os.path.join(env.scheme['platlib'], 'uses_library' + sysconfig.get_config_var('EXT_SUFFIX'))
2425
subprocess.check_call(['patchelf', '--remove-rpath', uses_library_path])
2526

0 commit comments

Comments
 (0)