Skip to content

How to specify a specific package version to CIBW_TEST_REQUIRES for Windows #1749

Answered by ymd-h
bhazelton asked this question in Q&A
Discussion options

You must be logged in to vote

Escape < by ^.

CIBW_TEST_REQUIRES: packaging pytest^<8.0 pytest-cov pytest-cases

I also struggled this problem, and finally solved it.
ymd-h/cpprb@b1a2bfd

On Windows, cibuildwheel executes sub command through shell (aka. cmd).

result = subprocess.run(
args_,
check=True,
shell=IS_WIN,
env=env,
cwd=cwd,
capture_output=capture_stdout,
text=capture_stdout,
)

And cmd requires to escape < character by ^.

Unfortunately, this is (probably) incompatible with Linux and macOS,
so that we might have to use configuration overrides or to use different environment variables depending…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bhazelton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants