mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-21 20:55:11 +00:00
docs: read version from pybind11 file (#2496)
* docs: read version from pybind11 file * docs: show full PEP 440 version everywhere
This commit is contained in:
parent
4e7c08daee
commit
99ef2b8467
14
docs/conf.py
14
docs/conf.py
@ -59,11 +59,15 @@ author = 'Wenzel Jakob'
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2.5'
|
||||
|
||||
# Read the listed version
|
||||
with open("../pybind11/_version.py") as f:
|
||||
code = compile(f.read(), "../pybind11/_version.py", "exec")
|
||||
loc = {}
|
||||
exec(code, loc)
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2.5.dev1'
|
||||
version = loc["__version__"]
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@ -145,7 +149,7 @@ else:
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
# "<project> v<version> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
|
Loading…
Reference in New Issue
Block a user