-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
setuptools_scm always bumps version #767
Comments
Ps, it's strongly recommended not to use post release, the scheme will eventually be deprecated |
Thanks for coming back so quickly!
Re your PS, I'm happy to dump the post release scheme when I get this sorted. It's the only way I've managed to deploy from my pipeline automatically thus far. |
Basically delete the version file from git if you want setuptools_scm to manage it, else it's changing it all the time I believe it may be necessary to error out if the version file is git tracked |
Thanks for the response! I added the version file in the first place because setuptools was complaining about my pyproject.toml file in that it has to have a
This was the only way I could figure out how to get this to work, though it seems probable that I'm doing something wrong. How should this be done per your guidance? |
Rightho! A quick update before I hope on a plane. Firstly -- thank you @RonnyPfannschmidt for your prompt attention today! I think I have managed to sort this out with the following approach.
I've just pushed the latest version tag (v0.0.14) to my repo and it's successfully been built by my pipeline and deployed to PyPI. Is there somewhere in the documentation for setuptools_crm that I could submit a pull request to clarify this so as to help others who come after me? |
The docs folder for detail documentation has not been created, it's somewhere on my within the next half year list, |
No worries. Thanks again for your help! |
I was having this same issue, and the cure was as Ronny said. Add _version.py to your gitignore and delete it. I would recommend adding a blurb about this for write_to. Something like "This parameter will likely result in unexpected behavior if you do not add the file to your gitignore." |
It's been a while since I last versioned a pure-python package, but good help from: pypa/setuptools-scm#767 (comment), with the dynamic setuptools/`pyproject.toml` changes. Issue: #5.
closing after #880 is merged now |
Hello! I'm struggling to get setuptools_scm to just lift the latest git tag as the version number and not bump it automatically every time. I'm not sure if this is a reportable issue, or just something silly I'm missing. The workflow is as follows:
git add . && git commit -am 'commit message here.'
git tag -a v0.0.13 -m 'release 0.0.13'
git push --follow-tags
Parameters in the pyproject.toml file for setuptools_scm:
For what it's worth, I added these scheme parameters after setuptools complained that the default (no) parameters didn't produce a PEP 440 compliant version number and wouldn't build.
The result is a version
v0.0.13post0
. I've Google my fingers raw trying to figure out what I'm doing wrong, and so I'm coming to the source. Is it the workflow I've described above, or is this a bug?Any help is appreciated!
Cheers.
The text was updated successfully, but these errors were encountered: