INNER CODE UNIT · Python
_read_version
nv-tlabs/3dgrut · threedgrut/__init__.py:25
def _read_version() -> str:
pyproject_path = Path(__file__).resolve().parents[1] / "pyproject.toml"
if pyproject_path.exists():
with pyproject_path.open("rb") as f:
return tomllib.load(f)["project"]["version"]
try:
return version("threedgrut")
except PackageNotFoundError:
return UNKNOWN_VERSION
__version__ = _read_version()
__all__ = ["gui", "__version__"]