Skip to content

Commit

Permalink
Add pyodide implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 30, 2024
1 parent 23d3ca2 commit beb8b9d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cibuildwheel/pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
BuildSelector,
call,
combine_constraints,
copy_test_sources,
download,
ensure_node,
extract_zip,
Expand Down Expand Up @@ -381,7 +382,15 @@ def build(options: Options, tmp_path: Path) -> None:

test_cwd = identifier_tmp_dir / "test_cwd"
test_cwd.mkdir(exist_ok=True)
(test_cwd / "test_fail.py").write_text(test_fail_cwd_file.read_text())
if build_options.test_sources:
copy_test_sources(
build_options.test_sources,
build_options.package_dir,
test_cwd,
)
else:
# There are no test sources. Copy the test safety file.
(test_cwd / "test_fail.py").write_text(test_fail_cwd_file.read_text())

shell(test_command_prepared, cwd=test_cwd, env=virtualenv_env)

Expand Down

0 comments on commit beb8b9d

Please sign in to comment.