Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use PEP600 policy names #288

Merged
merged 1 commit into from
Mar 6, 2021
Merged

Use PEP600 policy names #288

merged 1 commit into from
Mar 6, 2021

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented Feb 20, 2021

Add legacy aliases for manylinux_2_5, manylinux_2_12 & manylinux_2_17
The platform tag passed to auditwheel repair --plat argument can use either the PEP600 tag or the legacy tag.
The repaired wheel will get both platform tags.

e.g. auditwheel repair --plat manylinux1_x86_64 foo-5.0-cp38-cp38-linux_x86_64.whl and auditwheel repair --plat manylinux_2_5_x86_64 foo-5.0-cp38-cp38-linux_x86_64.whl will both produce foo-5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Builds on top of #287

@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #288 (69c2d62) into master (70e167d) will increase coverage by 0.35%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #288      +/-   ##
==========================================
+ Coverage   90.63%   90.99%   +0.35%     
==========================================
  Files          20       20              
  Lines        1079     1088       +9     
  Branches      232      234       +2     
==========================================
+ Hits          978      990      +12     
+ Misses         57       55       -2     
+ Partials       44       43       -1     
Impacted Files Coverage Δ
auditwheel/main_repair.py 88.46% <100.00%> (+7.61%) ⬆️
auditwheel/main_show.py 70.58% <100.00%> (ø)
auditwheel/policy/__init__.py 100.00% <100.00%> (ø)
auditwheel/repair.py 85.59% <100.00%> (ø)
auditwheel/wheeltools.py 89.31% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70e167d...69c2d62. Read the comment docs.

@mayeut
Copy link
Member Author

mayeut commented Feb 21, 2021

Failure on TravisCI ppc64le is unrelated to the PR.

Copy link
Contributor

@lkollar lkollar left a comment

Choose a reason for hiding this comment

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

Looks good. One thing we should consider is to list the aliases on the --help explicitly. Right now this can be a bit confusing:

 --plat {linux_x86_64,manylinux_2_5_x86_64,manylinux_2_12_x86_64,manylinux_2_17_x86_64,manylinux_2_24_x86_64,manylinux1_x86_64,manylinux2010_x86_64,manylinux2014_x86_64}

Maybe we should list the "old" platform tags separatly as legacy tags.

@mayeut
Copy link
Member Author

mayeut commented Feb 28, 2021

They should be allowed to be compatible with existing usage of auditwheel and thus displayed in this list. However, it might be good to have them referenced as legacy aliases somewhere.
I tried in the help message for --plat but the help formatter mess things up and I'm not keen on going raw formatting for all the help...

optional arguments:
  -h, --help            show this help message and exit
--plat {linux_x86_64,manylinux_2_5_x86_64,manylinux_2_12_x86_64,manylinux_2_17_x86_64,manylinux_2_24_x86_64,manylinux1_x86_64,manylinux2010_x86_64,manylinux2014_x86_64}
                        Desired target platform. (default:
                        "manylinux_2_5_x86_64") Legacy tags are still
                        supported and alias the new PEP600 tags.
                        manylinux1_x86_64 is an alias for
                        manylinux_2_5_x86_64. manylinux2010_x86_64 is an alias
                        for manylinux_2_12_x86_64. manylinux2014_x86_64 is an
                        alias for manylinux_2_17_x86_64.
  -L LIB_SDIR, --lib-sdir LIB_SDIR

Maybe adding an epilogue:

  --no-update-tags      Do not update the wheel filename tags and WHEEL info
                        to match the repaired platform tag.
  --strip               Strip symbols in the resulting wheel

Legacy tags are still supported and alias the new PEP600 tags.
manylinux1_x86_64 is an alias for manylinux_2_5_x86_64. manylinux2010_x86_64
is an alias for manylinux_2_12_x86_64. manylinux2014_x86_64 is an alias for
manylinux_2_17_x86_64.

Add legacy aliases for `manylinux_2_5`, `manylinux_2_12` & `manylinux_2_17`
The platform tag passed to `auditwheel repair` `--plat` argument can use either the PEP600 tag or the legacy tag.
The repaired wheel will get both platform tags.

e.g. `auditwheel repair --plat manylinux1_x86_64 foo-5.0-cp38-cp38-linux_x86_64.whl` and `auditwheel repair --plat manylinux_2_5_x86_64 foo-5.0-cp38-cp38-linux_x86_64.whl`  will both produce `foo-5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl`
@mayeut mayeut marked this pull request as ready for review February 28, 2021 19:40
@mayeut
Copy link
Member Author

mayeut commented Mar 6, 2021

@lkollar,
Since you approved the changes, I will merge this one to get things going forward but I will open another PR to try to address the one concern you have.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants