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

Unknown wheel version with flit 3.2.0 #415

Closed
RMeli opened this issue Jun 21, 2021 · 4 comments
Closed

Unknown wheel version with flit 3.2.0 #415

RMeli opened this issue Jun 21, 2021 · 4 comments

Comments

@RMeli
Copy link

RMeli commented Jun 21, 2021

I use flit in GitHub actions and there seem to be a problem with flit version 3.2.0:

$ flit build

Found 205 files tracked in git                                                                                            I-flit.sdist
Using setup.py from repository, not generating setup.py                                                                   W-flit.sdist
Built sdist: dist/spyrmsd-0.5.0.tar.gz                                                                               I-flit_core.sdist
Copying package file(s) from /var/folders/r0/2dklzyn57d59g13_21b6kt7h0000gp/T/tmpymefc7np/spyrmsd-0.5.0/spyrmsd      I-flit_core.wheel
Writing metadata files                                                                                               I-flit_core.wheel
Writing the record of files                                                                                          I-flit_core.wheel
Built wheel: dist/spyrmsd-0+unknown-py3-none-any.whl                                                                 I-flit_core.wheel

As you can see, the wheel version is unknown: dist/spyrmsd-0+unknown-py3-none-any.whl. This is problematic since flit publish fails with the following error:

$flit publish

[...]

requests.exceptions.HTTPError: 400 Client Error: '0+unknown' is an invalid value for Version. Error: Can't use PEP 440 local versions. See https://packaging.python.org/specifications/core-metadata for more information. for url: https://upload.pypi.org/legacy/

If I downgrade to flit version 3.1.0 the problem no longer persists:

$ flit build # with flit 3.1.0

Found 205 files tracked in git                                                                                            I-flit.sdist
Using setup.py from repository, not generating setup.py                                                                   W-flit.sdist
Built sdist: dist/spyrmsd-0.5.0.tar.gz                                                                               I-flit_core.sdist
Copying package file(s) from /var/folders/r0/2dklzyn57d59g13_21b6kt7h0000gp/T/tmp0llve0g8/spyrmsd-0.5.0/spyrmsd      I-flit_core.wheel
Writing metadata files                                                                                               I-flit_core.wheel
Writing the record of files                                                                                          I-flit_core.wheel
Built wheel: dist/spyrmsd-0.5.0-py3-none-any.whl                                                                     I-flit_core.wheel
@takluyver
Copy link
Member

The 0+unknown seems to come from your _version.py. I've never been a fan of those tools that try to figure out the version number when the module is loaded.

@RMeli
Copy link
Author

RMeli commented Aug 2, 2021

Hi @takluyver , thank you for looking into this. The 0+unknown comes indeed from _version.py, but what it is very puzzling is that the version on my local installation is correct, and flit used to work with versioneer ins previous versions. Did something changed in flit==3.2.0 that makes it incompatible with automatic versioning tools? flit==3.1.0 works as expected, as did previous versions.

@takluyver
Copy link
Member

I guess something must have changed, but there's nothing obvious in the release notes that would affect that. Maybe I missed something out of the release notes. You could also look through the complete diff or try bisecting it.

@RMeli
Copy link
Author

RMeli commented Sep 8, 2023

This is unfortunately still an issue: https://github.com/RMeli/spyrmsd/actions/runs/6126040044/job/16629237158

@RMeli RMeli closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
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

No branches or pull requests

2 participants