Skip to content

Commit

Permalink
Unpin pypa/build, pyodide-lock, and pytest for testing requirem…
Browse files Browse the repository at this point in the history
…ents (#197)

* Unpin `pypa/build`

* Keep `pyodide-lock` unpinned

* No Python executable setter, scripts dir removed

* Unpin `pytest`

* Trigger [integration] tests
  • Loading branch information
agriyakhetarpal authored Feb 3, 2025
1 parent 7928441 commit 3765815
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ test = [
"pytest-httpserver",
"pytest-pyodide",
"pytest-cov",
"pytest<8.0.0",
"build==0.7.0",
"pyodide-lock==v0.1.0a8",
"pytest",
"build",
"pyodide-lock",
]

[project.urls]
Expand Down
13 changes: 8 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ def _read_gzipped_testfile(file: Path) -> bytes:

def _build(build_dir, dist_dir):
import build
from build.env import IsolatedEnvBuilder
from build.env import DefaultIsolatedEnv

with DefaultIsolatedEnv() as env:
# https://build.pypa.io/en/stable/api.html#build.ProjectBuilder
builder = build.ProjectBuilder(
source_dir=build_dir,
python_executable=env.python_executable,
)

with IsolatedEnvBuilder() as env:
builder = build.ProjectBuilder(build_dir)
builder.python_executable = env.executable
builder.scripts_dir = env.scripts_dir
env.install(builder.build_system_requires)
builder.build("wheel", output_directory=dist_dir)

Expand Down

0 comments on commit 3765815

Please sign in to comment.