Skip to content

Commit 3765815

Browse files
Unpin pypa/build, pyodide-lock, and pytest for testing requirements (#197)
* Unpin `pypa/build` * Keep `pyodide-lock` unpinned * No Python executable setter, scripts dir removed * Unpin `pytest` * Trigger [integration] tests
1 parent 7928441 commit 3765815

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ test = [
2020
"pytest-httpserver",
2121
"pytest-pyodide",
2222
"pytest-cov",
23-
"pytest<8.0.0",
24-
"build==0.7.0",
25-
"pyodide-lock==v0.1.0a8",
23+
"pytest",
24+
"build",
25+
"pyodide-lock",
2626
]
2727

2828
[project.urls]

tests/conftest.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,15 @@ def _read_gzipped_testfile(file: Path) -> bytes:
4949

5050
def _build(build_dir, dist_dir):
5151
import build
52-
from build.env import IsolatedEnvBuilder
52+
from build.env import DefaultIsolatedEnv
53+
54+
with DefaultIsolatedEnv() as env:
55+
# https://build.pypa.io/en/stable/api.html#build.ProjectBuilder
56+
builder = build.ProjectBuilder(
57+
source_dir=build_dir,
58+
python_executable=env.python_executable,
59+
)
5360

54-
with IsolatedEnvBuilder() as env:
55-
builder = build.ProjectBuilder(build_dir)
56-
builder.python_executable = env.executable
57-
builder.scripts_dir = env.scripts_dir
5861
env.install(builder.build_system_requires)
5962
builder.build("wheel", output_directory=dist_dir)
6063

0 commit comments

Comments
 (0)