Skip to content

auditwheel choose higher priority tag when possible - #456

Merged
konstin merged 3 commits into
PyO3:masterfrom
messense:auditwheel-higher-priority
Mar 3, 2021
Merged

auditwheel choose higher priority tag when possible#456
konstin merged 3 commits into
PyO3:masterfrom
messense:auditwheel-higher-priority

Conversation

@messense

@messense messense commented Feb 28, 2021

Copy link
Copy Markdown
Member

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
Comment thread src/auditwheel/policy.rs
@messense
messense force-pushed the auditwheel-higher-priority branch from d29523c to d11a4c9 Compare March 2, 2021 13:14
Comment thread src/auditwheel/audit.rs Outdated
Comment thread src/build_context.rs Outdated
Comment thread src/build_context.rs
.is_ok()
{
println!(
"📦 Wheel is eligible for a higher priority tag. You requested {} but I have found this wheel is eligible for {}",

Copy link
Copy Markdown
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

konstin commented Mar 3, 2021

Copy link
Copy Markdown
Member

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

messense commented Mar 3, 2021

Copy link
Copy Markdown
Member Author

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

messense commented Mar 3, 2021

Copy link
Copy Markdown
Member Author

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

konstin commented Mar 3, 2021

Copy link
Copy Markdown
Member

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