Description of your problem
I use pyscaffold for several Python projects (amazing work btw!). On one of them with pyscaffold 4.0.2, I am building with tox -e build and generate sphinx documentation with tox -e docs with theme from readthedocs. The version infered from commit tag is OK for the build, but never for the documentation build: the displayed version on the html page is always 0.0.0.
Besides, when I type python setup.py --version the result is correct, but when doing the following in the Python console:
from mypackage import __version__ as version
print(version)
The result is also falling back to 0.0.0.
Describe the solution you would like to see for your use-case
Replace in generated setup.py:
setup(
use_scm_version={"version_scheme": "no-guess-dev"}
)
by:
setup(
use_scm_version={"version_scheme": "no-guess-dev"},
setup_requires=["setuptools_scm"],
)
In my case, it solves the issue. It seems to be the way to go in setuptools_scm documentation.
Versions and main components
- PyScaffold Version: 4.0.2
- Python Version: 3.8.10
- Operating system: Ubuntu 20.04.2.0 LTS
- How did you install PyScaffold: conda
Description of your problem
I use
pyscaffoldfor several Python projects (amazing work btw!). On one of them withpyscaffold 4.0.2, I am building withtox -e buildand generatesphinxdocumentation withtox -e docswith theme fromreadthedocs. The version infered from commit tag is OK for the build, but never for the documentation build: the displayed version on the html page is always0.0.0.Besides, when I type
python setup.py --versionthe result is correct, but when doing the following in the Python console:The result is also falling back to
0.0.0.Describe the solution you would like to see for your use-case
Replace in generated
setup.py:by:
In my case, it solves the issue. It seems to be the way to go in
setuptools_scmdocumentation.Versions and main components