提交 4c718164 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Virgile Andreani

Remove versioneer.py

上级 cd45c74b
...@@ -3,7 +3,7 @@ requires = [ ...@@ -3,7 +3,7 @@ requires = [
"setuptools>=59.0.0", "setuptools>=59.0.0",
"cython", "cython",
"numpy>=1.17.0", "numpy>=1.17.0",
"versioneer[toml]>=0.28", "versioneer[toml]==0.29",
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
......
...@@ -28,7 +28,10 @@ from functools import singledispatch ...@@ -28,7 +28,10 @@ from functools import singledispatch
from pathlib import Path from pathlib import Path
from typing import Any, NoReturn, Optional from typing import Any, NoReturn, Optional
from pytensor.version import version as __version__ from pytensor import _version
__version__: str = _version.get_versions()["version"]
pytensor_logger = logging.getLogger("pytensor") pytensor_logger = logging.getLogger("pytensor")
......
差异被折叠。
from pytensor._version import get_versions
FALLBACK_VERSION = "1.0.5+unknown"
info = get_versions()
if info["error"] is not None:
info["version"] = FALLBACK_VERSION
full_version = info["version"]
git_revision = info["full-revisionid"]
del get_versions
short_version = full_version.split("+")[0]
# This tries to catch a tag like beta2, rc1, ...
try:
int(short_version.split(".")[2])
release = True
except (ValueError, IndexError):
release = False
if release and info["error"] is None:
version = short_version
else:
version = full_version
del info
...@@ -25,3 +25,4 @@ pytensor/tensor/rewriting/basic.py ...@@ -25,3 +25,4 @@ pytensor/tensor/rewriting/basic.py
pytensor/tensor/type.py pytensor/tensor/type.py
pytensor/tensor/type_other.py pytensor/tensor/type_other.py
pytensor/tensor/variable.py pytensor/tensor/variable.py
pytensor/_version.py
#!/usr/bin/env python #!/usr/bin/env python
import numpy import numpy
import versioneer
from setuptools import Extension, setup from setuptools import Extension, setup
from setuptools.dist import Distribution from setuptools.dist import Distribution
import versioneer
dist = Distribution() dist = Distribution()
dist.parse_config_files() dist.parse_config_files()
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论