Skip to content

pyo3-build-config: make InterpreterConfig public#1848

Merged
davidhewitt merged 1 commit intoPyO3:mainfrom
indygreg:public-interpreter-config
Aug 31, 2021
Merged

pyo3-build-config: make InterpreterConfig public#1848
davidhewitt merged 1 commit intoPyO3:mainfrom
indygreg:public-interpreter-config

Conversation

@indygreg
Copy link
Contributor

PyOxidizer will want to create interpreter config files. Rather
than reinvent the logic for reading/writing these files, I think
it makes sense to consume the pyo3-build-config crate so we can
use the InterpreterConfig type directly. But the symbol needs
to be public to allow us to do that.

(Strictly speaking I could probably hack my way into getting an
instance of InterpreterConfig via get() and use that. But that
is exceptionally hacky.)

@davidhewitt
Copy link
Member

👍 I think this needs to happen.

Shall we go a little further and remove the #[doc(hidden)]?

I think to make this useful in practice you may also want PythonVersion, PythonImplementation , BuildFlags and BuildFlag made public too?

PyOxidizer will want to create interpreter config files. Rather
than reinvent the logic for reading/writing these files, I think
it makes sense to consume the `pyo3-build-config` crate so we can
use the `InterpreterConfig` type directly. But the symbol needs
to be public to allow us to do that. And in order to allow direct
construction, we need to make all the types referenced by its fields
public as well.
@indygreg indygreg force-pushed the public-interpreter-config branch from eb01281 to 62e1342 Compare August 30, 2021 16:45
@indygreg
Copy link
Contributor Author

Yeah, we need to make all referenced fields public as well. I would have realized that if I actually tried to use this branch :) Good catch.

I rebased and force pushed a change to expose the additional types.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks!

@davidhewitt davidhewitt merged commit 5e8d43c into PyO3:main Aug 31, 2021
@davidhewitt davidhewitt mentioned this pull request Aug 31, 2021
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

Successfully merging this pull request may close these issues.

2 participants