`pyo3-build-config` cleanups
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
In https://github.com/PyO3/pyo3/pull/4758 I fixed the urgent bug with PYO3_CONFIG_FILE changes not correctly triggering rebuilds.
I think we can take action to ensure we don't have a similar accident again. I was playing around with various ideas, I've seen two so far which I think make sense:
- A lot of
pyo3-build-configAPIs require being run in a build script. I wonder if we should have something like aBuildScriptContextstruct which all those APIs take, and it can collect info about environment accesses so that we can both test them and emit to cargo reliably. - We can add clippy configuration to ban direct environment variable access, as suggested by @alex .
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the pyo3-build-config APIs and the changes in pull request #4758 around PYO3_CONFIG_FILE rebuilds. Compare the proposed BuildScriptContext approach with adding Clippy rules that ban direct environment-variable access. Done means the chosen cleanup is specified, implemented, and verifies environment accesses reliably in tests and Cargo output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100