Skip to content

Commit

Permalink
test: base Pyodide wheel deps off poetry.lock
Browse files Browse the repository at this point in the history
Will this fix the typing_extensions/Any error?
  • Loading branch information
tombh committed Jul 29, 2023
1 parent 5f74290 commit 476eaf1
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions tests/pyodide_testrunner/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,33 @@ def build_wheel() -> str:
for src, target in directories:
shutil.copytree(REPO / src, dest / target)

files = ["pyproject.toml", "README.md", "ThirdPartyNotices.txt"]
files = [
"pyproject.toml",
"poetry.lock",
"README.md",
"ThirdPartyNotices.txt"
]

for src in files:
shutil.copy(REPO / src, dest)

# Build the wheel
# Convert the lock file to requirements.txt.
# Ensures reproducible behavour for testing.
subprocess.run([
"poetry",
"build",
"--format=wheel"
"export",
"-f", "requirements.txt",
"--output", "requirements.txt"
], cwd=dest)
subprocess.run([
"poetry",
"run",
"pip",
"install",
"-r", "requirements.txt"
], cwd=dest)
# Build the wheel
subprocess.run(["poetry", "build", "--format", "wheel"], cwd=dest)
whl = list((dest / "dist").glob("*.whl"))[0]
shutil.copy(whl, REPO / "tests/pyodide_testrunner")

Expand Down

0 comments on commit 476eaf1

Please sign in to comment.