Open alinsavix opened 2 years ago
Same for flit-scm.
Support for dynamic version retrieval would be very welcome.
Same for Hatch.
Support for dynamic version
retrieval or for skipping retrieval of version
from pyproject.toml
would be very welcome.
I noticed that this package only gets automated updates. Is it still being actively developed @domdfcoding?
Are there any other usecases which aren't covered by #19, or can I close this now v0.3.0 is out?
Does anybody have a working example of pulling the version number used in sphinx from a git tag? I can't really find a comprehensive example, just snippets here and there. Would appreciate any pointer.
Does anybody have a working example of pulling the version number used in sphinx from a git tag? I can't really find a comprehensive example, just snippets here and there. Would appreciate any pointer.
In particular, the following is what bugs me:
when trying to retrieve the version with setuptool_scm in pyproject.toml, and setting dynamic = ["version"], I get the following Error:
dom_toml.parser.BadConfigError: Either 'version' was not declared in the 'project' table or it was marked as 'dynamic', which is unsupported by 'sphinx-pyproject
The PR linked in this issue does not seem to address this.
Description
Currently, I use
setuptools_scm
to determine the correct version number for my package, and write that version to a file in my module, after settingversion
to be dynamic.e.g. in my
pyproject.toml
(irrelevant lines elided):...and then some quick stub code in my package's
__init__.py
:Currently, no matter what exists in my documentation's
conf.py
, attempting to initialize things viaSphinxConfig()
gives an error aboutversion
being unset or marked as dynamic.What I'd like to be able to do is something like this in my
conf.py
(which is basically what I'm doing currently, minus sphinx-pyproject):...and have it work, because "version" is already set in the global namespace. There's lots of ways to accomplish the same thing, though, e.g.
SphynxConfig
could take an extra argument, something likedefaults={"version": version}
or similar. Or simply have a flag that can be passed to it to indicate that it couldn't fail just because one of the expected values isn't there. It doesn't matter too much which way the problem is solved, as long as it's still possible to use sphinx-pyproject without a version number hardcoded in thepyproject.toml
.Thanks!
Version