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: Replace TargetInfo with target_lexicon::Triple #2253

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

ravenexp
Copy link
Contributor

Add a new public crate function cross_compile_from_to() using
target_lexicon::Triple arguments instead of plain strings
used in cross_compile().

Attempt to extract common code patterns into methods and standalone
helper functions. Add docstrings to private items.
Make some of the new helper functions public within the PyO3 crate
and reuse them in the build scripts.

No user visible functionality change.

@ravenexp ravenexp force-pushed the target-lexicon branch 3 times, most recently from d4b59aa to 2c4d82d Compare March 28, 2022 12:51
@ravenexp ravenexp requested a review from adamreichold March 28, 2022 16:11
if !env_vars.any() && is_not_cross_compiling(host, &target_info) {
return Ok(None);
}
// FIXME: This field is currently unused.
Copy link
Member

Choose a reason for hiding this comment

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

I guess we don't need to address these FIXMEs right now since we're going to remove cross_compiling in a new minor version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, certainly. These FIXMEs will be removed with cross_compiling() in v0.17.
Perhaps I should've used WONTFIX: instead of FIXME: 😁.

Copy link
Member

@adamreichold adamreichold left a comment

Choose a reason for hiding this comment

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

Minor suggestions and one functional question on serializing the whole interpreter config into DEP_PYTHON_PYO3_CONFIG.

pyo3-ffi/build.rs Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Outdated Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Outdated Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Outdated Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Outdated Show resolved Hide resolved
pyo3-build-config/src/impl_.rs Outdated Show resolved Hide resolved
Add a new public crate function `cross_compile_from_to()` using
`target_lexicon::Triple` arguments instead of plain strings
used in `cross_compile()`.

Deprecate `pyo3_build_config::cross_compile()` since v0.17.

Attempt to extract common code patterns into methods and standalone
helper functions. Add docstrings to the new private items.
Make some of the new helper functions public within the PyO3 crate
and reuse them in the build scripts.

Add PYO3_CROSS_PYTHON_VERSION parsing unit test.

Add a ChangeLog entry mentioning the new `pyo3-build-config` API.
@adamreichold adamreichold merged commit 601e3d6 into PyO3:main Apr 1, 2022
@ravenexp ravenexp deleted the target-lexicon branch April 1, 2022 08:29
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.

3 participants