Skip to content

Commit 7631d10

Browse files
authored
Merge pull request #80 from neutrinoceros/fixup_pyproject_only_test
2 parents 0bff37c + 9283a42 commit 7631d10

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

extension_helpers/tests/test_setup_helpers.py

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ def test():
378378
"""
379379
)
380380

381+
buildtime_requirements = ["setuptools>=43.0.0", "wheel", "Cython"]
381382
test_pkg.join("pyproject.toml").write(
382383
dedent(
383384
f"""\
@@ -389,9 +390,7 @@ def test():
389390
find = {{namespaces = false}}
390391
391392
[build-system]
392-
requires = ["setuptools>=43.0.0",
393-
"wheel",
394-
"cython"]
393+
requires = [{', '.join(f'"{_}"' for _ in buildtime_requirements)}]
395394
build-backend = 'setuptools.build_meta'
396395
397396
"""
@@ -404,17 +403,28 @@ def test():
404403
with test_pkg.as_cwd():
405404
# NOTE: we disable build isolation as we need to pick up the current
406405
# developer version of extension-helpers
407-
subprocess.call(
408-
[
409-
sys.executable,
410-
"-m",
411-
"pip",
412-
"install",
413-
".",
414-
"--no-build-isolation",
415-
f"--target={install_temp}",
416-
]
417-
)
406+
# In order to do so, we need to ensure that build-time dependencies are
407+
# installed first
408+
cmd1 = [
409+
sys.executable,
410+
"-m",
411+
"pip",
412+
"install",
413+
*buildtime_requirements,
414+
f"--target={install_temp}",
415+
]
416+
subprocess.call(cmd1)
417+
418+
cmd2 = [
419+
sys.executable,
420+
"-m",
421+
"pip",
422+
"install",
423+
".",
424+
"--no-build-isolation",
425+
f"--target={install_temp}",
426+
]
427+
subprocess.call(cmd2)
418428

419429
if "" in sys.path:
420430
sys.path.remove("")

0 commit comments

Comments
 (0)