Skip to content

Commit 00e7245

Browse files
henryiiiFFY00
authored andcommitted
fix: apply fixes based on tests
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent ae55c58 commit 00e7245

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mesonpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ def get_requires_for_build_wheel(
10261026
config_settings: Optional[Dict[str, str]] = None,
10271027
) -> List[str]:
10281028
dependencies = [_depstr.wheel, *_get_ninja_if_needed()]
1029-
if sys.platform.startswith("linux"):
1029+
if sys.platform.startswith('linux'):
10301030
# we may need patchelf
10311031
if not shutil.which('patchelf'):
10321032
# patchelf not already accessible on the system

tests/test_pep517.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
@pytest.mark.parametrize('package', ['pure', 'library'])
17-
@pytest.mark.parametrize('system_patchelf', [True, False], ids=['patchelf', 'nopatchelf'])
17+
@pytest.mark.parametrize('system_patchelf', ['patchelf', None], ids=['patchelf', 'nopatchelf'])
1818
@pytest.mark.parametrize('ninja', [None, '1.8.1', '1.8.3'], ids=['noninja', 'oldninja', 'newninja'])
1919
def test_get_requires_for_build_wheel(monkeypatch, package, system_patchelf, ninja):
2020
def which(prog: str) -> bool:
@@ -37,7 +37,7 @@ def run(cmd: List[str], *args: object, **kwargs: object) -> subprocess.Completed
3737
monkeypatch.setattr(subprocess, 'run', run)
3838

3939
expected = {mesonpy._depstr.wheel}
40-
if system_patchelf and sys.platform.startswith('linux'):
40+
if system_patchelf is None and sys.platform.startswith('linux'):
4141
expected |= {mesonpy._depstr.patchelf}
4242
if ninja is None or [int(x) for x in ninja.split('.')] < [1, 8, 2]:
4343
expected |= {mesonpy._depstr.ninja}

tests/test_pep518.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
def test_pep518(pep518, virtual_env, package, build_args, tmp_path):
1818
dist = tmp_path / 'dist'
1919

20-
result = subprocess.run([virtual_env, '-m', 'pip', 'install', 'build'], check=False)
20+
result = subprocess.run([str(virtual_env), '-m', 'pip', 'install', 'build'], check=False)
2121
assert result.returncode == 0
2222

2323
with cd_package(package):
2424
result = subprocess.run(
25-
[virtual_env, '-m', 'build', f'--outdir={dist}', *build_args], check=False
25+
[str(virtual_env), '-m', 'build', f'--outdir={dist}', *build_args], check=False
2626
)
2727
assert result.returncode == 0

0 commit comments

Comments
 (0)