Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyo3-build-config cleanups #4761

Open
davidhewitt opened this issue Dec 3, 2024 · 2 comments
Open

pyo3-build-config cleanups #4761

davidhewitt opened this issue Dec 3, 2024 · 2 comments

Comments

@davidhewitt
Copy link
Member

In #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-config APIs require being run in a build script. I wonder if we should have something like a BuildScriptContext struct 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 .
@ravenexp
Copy link
Contributor

ravenexp commented Dec 4, 2024

I will have some free time in the second half of December, and I'd like to try to do this, if it's not too late.

I'm still somewhat familiar with the pyo3-build-config code base from working on Windows cross-compilation support two years ago.

@davidhewitt
Copy link
Member Author

Please go ahead, I think 0.24 will land sometime early in the new year so it would be great to see this happen in December :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants