mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-06 06:01:48 +00:00
use setuptools_scm for version management
This commit is contained in:
parent
94ae3eaf5c
commit
25901f03c1
5
pyproject.toml
Normal file
5
pyproject.toml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
write_to = "src/allmydata/_version.py"
|
@ -3,55 +3,14 @@ Decentralized storage grid.
|
|||||||
|
|
||||||
community web site: U{https://tahoe-lafs.org/}
|
community web site: U{https://tahoe-lafs.org/}
|
||||||
"""
|
"""
|
||||||
from __future__ import absolute_import
|
|
||||||
from __future__ import division
|
|
||||||
from __future__ import print_function
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from future.utils import PY2, PY3
|
|
||||||
if PY2:
|
|
||||||
# Don't import future str() so we don't break Foolscap serialization on Python 2.
|
|
||||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, max, min # noqa: F401
|
|
||||||
from past.builtins import unicode as str
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"__version__",
|
"__version__",
|
||||||
"full_version",
|
|
||||||
"branch",
|
|
||||||
"__appname__",
|
"__appname__",
|
||||||
"__full_version__",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
__version__ = "unknown"
|
|
||||||
try:
|
|
||||||
# type ignored as it fails in CI
|
|
||||||
# (https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-lafs/1647/workflows/60ae95d4-abe8-492c-8a03-1ad3b9e42ed3/jobs/40972)
|
|
||||||
from allmydata._version import __version__ # type: ignore
|
|
||||||
except ImportError:
|
|
||||||
# We're running in a tree that hasn't run update_version, and didn't
|
|
||||||
# come with a _version.py, so we don't know what our version is.
|
|
||||||
# This should not happen very often.
|
|
||||||
pass
|
|
||||||
|
|
||||||
full_version = "unknown"
|
|
||||||
branch = "unknown"
|
|
||||||
try:
|
|
||||||
# type ignored as it fails in CI
|
|
||||||
# (https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-lafs/1647/workflows/60ae95d4-abe8-492c-8a03-1ad3b9e42ed3/jobs/40972)
|
|
||||||
from allmydata._version import full_version, branch # type: ignore
|
|
||||||
except ImportError:
|
|
||||||
# We're running in a tree that hasn't run update_version, and didn't
|
|
||||||
# come with a _version.py, so we don't know what our full version or
|
|
||||||
# branch is. This should not happen very often.
|
|
||||||
pass
|
|
||||||
|
|
||||||
__appname__ = "tahoe-lafs"
|
__appname__ = "tahoe-lafs"
|
||||||
|
from allmydata._version import __version__
|
||||||
# __full_version__ is the one that you ought to use when identifying yourself
|
|
||||||
# in the "application" part of the Tahoe versioning scheme:
|
|
||||||
# https://tahoe-lafs.org/trac/tahoe-lafs/wiki/Versioning
|
|
||||||
__full_version__ = __appname__ + '/' + str(__version__)
|
|
||||||
|
|
||||||
|
|
||||||
# Install Python 3 module locations in Python 2:
|
# Install Python 3 module locations in Python 2:
|
||||||
from future import standard_library
|
from future import standard_library
|
||||||
|
Loading…
x
Reference in New Issue
Block a user