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

Add bindings detection to bin targets #938

Merged
merged 1 commit into from
May 28, 2022
Merged

Conversation

messense
Copy link
Member

Closes #311

@netlify
Copy link

netlify bot commented May 26, 2022

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit dbbb56e
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/62919c91aa319d000a08fe85
😎 Deploy Preview https://deploy-preview-938--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Bin,
/// The String is the name of the bindings
/// providing crate, e.g. pyo3, the number is the minimum minor python version
Bin(Option<(String, usize)>),
Copy link
Member Author

Choose a reason for hiding this comment

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

@davidhewitt I wonder should we support abi3 bin bindings, if so I think BridgeModel needs a refactoring to separate bin/lib targets from pyo3/rust-cpython bindings crate. Something like

enum BuildType {
    Bin(Option<BridgeModel>),
    Library(BridgeModel),
}

enum BridgeModel {
    Cffi,
    Bindings(String, usize),
    BindingsAbi3(u8, u8),
}

Copy link
Member

Choose a reason for hiding this comment

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

Based on PyO3/pyo3#2328 (comment) I understood that it's not really possible to link to libpython3.so (i.e. abi3 distribution) without fixing issues in upstream CPython.

@messense
Copy link
Member Author

messense commented May 27, 2022

The Windows test failure is odd, it works when execute pyo3-bin.exe directly from terminal, but subprocess.check_output returns exit code 3221225781.

image

@messense messense force-pushed the bridge-model branch 3 times, most recently from 8bb02e9 to 0a91da6 Compare May 27, 2022 12:11
@messense messense marked this pull request as ready for review May 27, 2022 12:11
@messense messense merged commit 72bf4e4 into PyO3:main May 28, 2022
@messense messense deleted the bridge-model branch May 28, 2022 04:14
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.

Building Rust binaries
2 participants