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

mechanism for "auditwheel repair" to add a local version identifier? #53

Open
sbidoul opened this issue Oct 25, 2016 · 9 comments
Open

Comments

@sbidoul
Copy link
Member

sbidoul commented Oct 25, 2016

Hi,

Running auditwheel repair may generate subtly different versions of the wheel, depending on the exact version of so libraries being included.

When looking at the wheel or otherwise running pip freeze there is no externally visible difference though.

I was wondering if it would make sense to have auditwheel repair accept a new optional "local version identifier" [1] argument that would be appended to the repaired wheel version.

This would enable user to encode some information about the embedded dependencies in the repaired version.

[1] https://www.python.org/dev/peps/pep-0440/#local-version-identifiers

@njsmith
Copy link
Member

njsmith commented Oct 25, 2016

Note that local versions aren't allowed on PyPI -- it doesn't rule this out, but does mean that it'd only be useful in somewhat limited circumstances for local/private builds.

Another thing to consider looking at is the rarely-used "build tag" that wheel files support: https://www.python.org/dev/peps/pep-0427/#file-name-convention

What's your use case? Do you have multiple wheels that vendor different library versions that you need to keep track of? There are lots of ways that two versions of "the same wheel" can differ, well before auditwheel arrives on the scene -- using different compiler versions, different compiler options (optimized vs. debug), stripped binaries or not, different build-time configuration...

@sbidoul
Copy link
Member Author

sbidoul commented Oct 25, 2016

My use case is indeed local/private builds. For instance I'm looking for a mechanism to express that my private build of some wheel contains a specific version of libssl.so to know when I need to upgrade my frozen requirements.txt.

@sbidoul
Copy link
Member Author

sbidoul commented Oct 25, 2016

I've had a look at build tags. AFAIU it will not work for my use case because they are lost after install and do not come out in a pip freeze.

@ogrisel
Copy link
Contributor

ogrisel commented Jan 3, 2017

I am fine with adding an option to append a local version identifier. @sbidoul do you want to submit a PR?

@sbidoul
Copy link
Member Author

sbidoul commented Jan 3, 2017

@ogrisel I can give it a try.

I was wondering if there is are documented APIs to manipulate the version (I could not find it so far), or if the metadata files have to be manipulated "by hand".

@njsmith
Copy link
Member

njsmith commented Jan 3, 2017 via email

@anntzer
Copy link
Contributor

anntzer commented Jun 13, 2019

FWIW if auditwheel was updated to support the most recent version of wheel (but see #102), this would not need to be implemented on auditwheel's side, but would just be a matter of wheel unpack && wheel pack ... --build-number=....

@sbidoul
Copy link
Member Author

sbidoul commented Jun 14, 2019

@anntzer Support for build number in wheel pack is interesting. Yet I think this build number is not what I want. See my comment above.

@lkollar
Copy link
Contributor

lkollar commented Sep 18, 2023

It would be nice if auditwheel could do this, but given that adding/changing local version identifiers needs to be done "manually" in a bunch of metadata files, we either need a tool or library we can use for this, or recommend an external tool for this. I'm not aware of any such tool, but opened pypa/wheel#570 in wheel as a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants