-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix astacus/version issues #193
Conversation
In some situations (.e.g. when building packages from aiven-core) it could happen that the wrong .git directory is found, causing a total version mismatch. This target should work if and only if we've got an actual .git directory for the current project, and fail otherwise.
We don't want to have version automatically generated, as it can cause mistakes. We let users generate the version file if it's really needed.
bf4e3f6
to
47d7ef1
Compare
Some issues where found with version generation; version didn't follow pep-440 standards, and it relied on git for actual fetching, while we may want to override the version from outside to match the actual version from the rpm package we build. Also, we don't want generation to happen automagically, but intentionally, so we had clear targets for what should be happening.
We don't want setup.py to do anything magic; it should just use the already-set version, which should be previously generated.
Target is unused, remove it.
0080cdc
to
29b8340
Compare
We need to generate the version at the right moment, before full requirements need to be installed.
29b8340
to
b507269
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #193 +/- ##
==========================================
- Coverage 89.10% 89.07% -0.04%
==========================================
Files 144 144
Lines 10216 10220 +4
==========================================
Hits 9103 9103
- Misses 1113 1117 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts need to be fixed since we're now packaging using pyproject.toml
I'm not sure what should I do anymore. It seems that a #194 was merged before this and touched the same files. But I don't understand whether it addresses the same concerns. |
it seems this was already solved independently. |
Astacus relied on autogenerated versioning from git which could happen or change without real knowledge of the developer, and could cause issues if an accidental git directory was found in a parent when using astacus from a non-git tarball.
This PR:
It seems that we're using all possible packaging files and approaches - multiple requirements files, pyproject, setup.py AND setup.cfg - I didn't want to enter that packaging-related discussion because I couldn't see the end of it, so I just took the existing versioning code and made it predictable & error-proof, I didn't change the "current way of doing things".