-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
bad interaction with setuptools_scm #2144
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
Comments
I'm not entirely familiar with setuptools_scm, but seems like what we want to is to make sure we're patching |
While the version is evaluation occurs when My work around for now is to renamed |
I use setuptools_scm and readthedocs and am not seeing this behavior. |
@untitaker Can you please provide a link to your project? I am seeing this behaviour every time (without the work around). |
https://vdirsyncer.pimutils.org/en/master/ and https://vdirsyncer.pimutils.org/en/stable/ show the correct version each in the |
@untitaker looks like your release = vdirsyncer.__version__
version = '.'.join(release.split('.')[:2]) # The short X.Y version. This is different (but maybe better???) then the recommended approach, from https://github.com/pypa/setuptools_scm, which asks setuptools_scm what the version number is when the documentation is being built.
|
I'm getting this problem for my project even though I get the version from the generated version.py file (here's my conf.py). Is there a workaround? |
@alimanfoo I mentioned my work around earlier in this issue: #2144 (comment) |
Great, thanks very much. On Saturday, 23 July 2016, Brian May [email protected] wrote:
Alistair Miles |
This issue has been open for a while, and I don't think we'll have the resources to address an edge case like this. If anyone else wants to take this on, I'm happy to assign, but closing for now. |
In any case there is documentation on how to avoid this problem: https://github.com/pypa/setuptools_scm#usage-from-sphinx |
RTD is modifying doc/conf.py, which causes setuptools_scm to increment the version number, because the repo is in a dirty state See pypa/setuptools-scm#84 readthedocs/readthedocs.org#2144
RTD is modifying doc/conf.py, which causes setuptools_scm to increment the version number, because the repo is in a dirty state See pypa/setuptools-scm#84 readthedocs/readthedocs.org#2144
I just want to mention here we've documented a workaround for this issue at https://docs.readthedocs.io/en/latest/build-customization.html#avoid-having-a-dirty-git-index |
readthedocs/readthedocs.org#2144 (comment) mentions a different way to avoid having an incorrect version computed during the documentation buld process: https://docs.readthedocs.io/en/latest/build-customization.html#avoid-having-a-dirty-git-index
It looks like readthedocs alters docs/conf.py before building documentation.
This in turn means that setuptools_scm detects the change and changes the version number. This behaviour is incorrect.
Is it possible that readthedocs could copy the file to somewhere else (maybe outside the tree) before making modifications?
References:
http://stackoverflow.com/questions/35811267/readthedocs-and-setuptools-scm-version-wrong/36386177
pypa/setuptools-scm#84
The text was updated successfully, but these errors were encountered: