smheidrich/py-json-stream-rs-tokenizer

Rust toolchain caching in CI could use dynamic CIBW_ENVIRONMENT definitions to set paths

smheidrich opened this issue · 0 comments

For Linux, there is currently an overcomplicated mechanism involving moving container-specific cache directories to and from the global cache dir into static paths that have previously been set in PATH and CARGO_HOME/RUSTUP_HOME. I did it this way because I thought I'd only have access to the name of the current architecture inside the before_all, before_build and test/repair commands.

But actually, CIBW_ENVIRONMENT is evaluated inside each container, so I already have access to the name of the architecture there, e.g. via $(uname -m). Hence, this can be simplified to not move anything around and just set architecture-containing paths from the get go.

Cf. pypa/cibuildwheel#1329 (comment)