mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +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:
6
setup.py
6
setup.py
@@ -35,9 +35,9 @@ to_src = (
|
||||
# Read the listed version
|
||||
with open("pybind11/_version.py") as f:
|
||||
code = compile(f.read(), "pybind11/_version.py", "exec")
|
||||
loc = {}
|
||||
exec(code, loc)
|
||||
version = loc["__version__"]
|
||||
loc = {}
|
||||
exec(code, loc)
|
||||
version = loc["__version__"]
|
||||
|
||||
# Verify that the version matches the one in C++
|
||||
with open("include/pybind11/detail/common.h") as f:
|
||||
|
||||
Reference in New Issue
Block a user