Skip to content

Commit

Permalink
upgrade parsimonious for py3.11 support, use python script to run pyt…
Browse files Browse the repository at this point in the history
…est twice for windows support
  • Loading branch information
SonOfLilit committed Sep 6, 2022
1 parent 9fe8d4e commit a6f88c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions ke/tests/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import subprocess
import sys

env = dict(os.environ)
this_dir = os.path.dirname(__file__)

env["KLEENEXP_RUST"] = "1"
result_rust = subprocess.call(["pytest", this_dir], env=env)
env["KLEENEXP_RUST"] = "0"
result_python = subprocess.call(["pytest", this_dir], env=env)
sys.exit(
2 * bool(result_rust) + bool(result_python)
) # 0 for neither failed, 3 for both, 2 for rust, 1 for python
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-verbosity = 1
# docs recommend build-system.requires, but it seems to be ignored
before-build = "pip install --upgrade setuptools wheel setuptools-rust"
test-requires = "pytest midastest"
test-command = "KLEENEXP_RUST=1 pytest {package} && KLEENEXP_RUST=0 pytest {package}"
test-command = "python {package}/ke/tests/run.py"

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]

0 comments on commit a6f88c0

Please sign in to comment.