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

Versioneer making 'untagged' version strings - now breaking upload to PyPI #1201

Closed
DavidT3 opened this issue Aug 12, 2024 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@DavidT3
Copy link
Owner

DavidT3 commented Aug 12, 2024

For some reason versioneer is making version strings without tags in them, even though there are previous tags available.

This seems to happen on my dev computer and during the github action that builds and sends to PyPI (this is new) - PyPI of course won't accept such a version file so I can't do new releases till this is fixed.

I'm experimenting with versioneer settings (I never really got along with this module), but if I can't fix it I might have to try versioningit (https://github.com/jwodder/versioningit)

@DavidT3 DavidT3 added the bug Something isn't working label Aug 12, 2024
@DavidT3 DavidT3 self-assigned this Aug 12, 2024
@DavidT3
Copy link
Owner Author

DavidT3 commented Aug 12, 2024

I have solved this locally while still using versioneer - I'm not entirely comfortable with the way I did it, because I altered _version.py and removed some generality (I altered the call to git describe so that the 'match' flag isn't only looking for digit-based tag names (plus whatever prefix is specified).

However, I think it is safe because this is my own local version, and I do only make tags with the vx.y.z format.

As to why this is happening, somehow my local shell (zsh, Apple M1 Pro) may not have the same glob syntax as other shells or environments - the part of the --match flag that is [[:digit:]]* doesn't produce any matches with my tags when I run it on my dev machine (with the latest tag being v0.4.5-232-g5f827ed-dirty for instance, it should). However when running on another machine (a linux environment, Ubuntu 22.04) the same flag works fine.

Using versioneer may not be sustainable in the longer term (I didn't realize it isn't really maintained anymore), and I've yet to see if this will work when I try to run the GitHub action, but it'll do for now

DavidT3 added a commit that referenced this issue Aug 12, 2024
…rrect' version (i.e. contains the tag number rather than 'untagged') - for issue #1201, where there is a better explanation
DavidT3 added a commit that referenced this issue Aug 12, 2024
…eason I've never had successful versioning I may become very upset. For issue #1201
DavidT3 added a commit that referenced this issue Aug 12, 2024
DavidT3 added a commit that referenced this issue Aug 12, 2024
@DavidT3
Copy link
Owner Author

DavidT3 commented Aug 12, 2024

So the tag is definitely being checked out, which is good news

@DavidT3 DavidT3 closed this as completed Aug 12, 2024
@DavidT3 DavidT3 reopened this Aug 12, 2024
@DavidT3
Copy link
Owner Author

DavidT3 commented Aug 12, 2024

Didn't mean to close that.

I think the issues is now probably exactly that which I changed in the _version.py file in xga - but actually in the versioneer.py file which is in the top level (as that is what setup.py actually calls). I'm going to modify it and see.

DavidT3 added a commit that referenced this issue Aug 12, 2024
… restored the final step which actually pushes it to testPyPI. For issue #1201
@DavidT3
Copy link
Owner Author

DavidT3 commented Aug 12, 2024

So, test PyPI publish now works fine (and the version number is FINALLY correct). So I'll do the actual publish and see how that goes

DavidT3 added a commit that referenced this issue Aug 12, 2024
…ifferent way to the test one - seeing as I know the test one works I'm reverting to that. For issue #1201
@DavidT3
Copy link
Owner Author

DavidT3 commented Aug 12, 2024

All is well - v0.5.0 of XGA is released, and I've even solved the problem I've had for years where versioneer wasn't setting the actual version in the built version of the package.

@DavidT3 DavidT3 closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant