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

auditwheel choose higher priority tag when possible #456

Merged
merged 3 commits into from
Mar 3, 2021

Conversation

messense
Copy link
Member

@messense messense commented Feb 28, 2021

Example:

🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.9 at /opt/python/cp39-cp39/bin/python
   Compiling pyo3 v0.13.2
   Compiling pyo3-mixed v2.1.1 (/io/test-crates/pyo3-mixed)
    Finished dev [unoptimized + debuginfo] target(s) in 6.46s
📦 Built wheel for CPython 3.9 to dist/pyo3_mixed-2.1.1-cp39-cp39-manylinux2010_x86_64.whl
📦 Wheel is eligible for a higher priority tag. You requested manylinux2010 but I have found this wheel is eligible for manylinux1
📦 Fixed-up wheel written to dist/pyo3_mixed-2.1.1-cp39-cp39-manylinux1_x86_64.whl

@messense messense force-pushed the auditwheel-higher-priority branch 2 times, most recently from 93e8822 to d29523c Compare March 2, 2021 01:02
@messense messense force-pushed the auditwheel-higher-priority branch from d29523c to d11a4c9 Compare March 2, 2021 13:14
src/auditwheel/audit.rs Outdated Show resolved Hide resolved
src/build_context.rs Outdated Show resolved Hide resolved
.is_ok()
{
println!(
"📦 Wheel is eligible for a higher priority tag. You requested {} but I have found this wheel is eligible for {}",
Copy link
Member

Choose a reason for hiding this comment

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

This is great 👍

@konstin
Copy link
Member

konstin commented Mar 3, 2021

I think the ideal solution would be having three categories:

  • auto (default): Goes from the highest to the lowest priority, tags the first one that matches. If nothing matches, uses manylinux
  • 2010/2014/2_24/etc.: Tag exactly this version. maturin should tell users about a higher priority tag, but tag the one requested.
  • off: Tags linux

There might be a case for a fourth option, manylinux, which tags the highest manylinux possible and fails if only linux would match.

This PR is already a huge improvement as-is, so I'm happy with merging this now and figuring out the specifics of the cli arguments later

@messense
Copy link
Member Author

messense commented Mar 3, 2021

This PR is already a huge improvement as-is, so I'm happy with merging this now and figuring out the specifics of the cli arguments later

Sure, let's do that later in #448

@messense
Copy link
Member Author

messense commented Mar 3, 2021

auto (default): Goes from the highest to the lowest priority, tags the first one that matches. If nothing matches, uses manylinux

Do you mean If nothing matches, uses linux?

@konstin
Copy link
Member

konstin commented Mar 3, 2021

Oops, yes that should have been linux

@konstin konstin merged commit f1862a7 into PyO3:master Mar 3, 2021
@messense messense deleted the auditwheel-higher-priority branch March 3, 2021 10:44
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