Add version file information (because setuptools_scm is mean and won't work with release tarballs ;-;)

This commit is contained in:
Gnarwhal 2024-08-01 06:16:09 +00:00
parent 11740120ac
commit e6d07367e0
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
3 changed files with 16 additions and 8 deletions

3
.gitignore vendored
View file

@ -159,6 +159,3 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
# Version file
_version.py

View file

@ -1,10 +1,10 @@
[build-system] [build-system]
requires = ["setuptools", "setuptools_scm"] requires = ["setuptools"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "sshare" name = "sshare"
dynamic = ["version"] version = "1.0.0"
authors = [ authors = [
{ name = "Gnarwhal", email = "git.aspect893@passmail.net" }, { name = "Gnarwhal", email = "git.aspect893@passmail.net" },
] ]
@ -28,6 +28,3 @@ Issues = "https://forge.monodon.me/Gnarwhal/sshare/issues"
[project.scripts] [project.scripts]
sshare = "sshare.cli:main" sshare = "sshare.cli:main"
[tool.setuptools_scm]
version_file = "src/sshare/_version.py"

14
src/sshare/_version.py Normal file
View file

@ -0,0 +1,14 @@
TYPE_CHECKING = False
if TYPE_CHECKING:
from typing import Tuple, Union
VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
VERSION_TUPLE = object
version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE
__version__ = version = '1.0.0'
__version_tuple__ = version_tuple = (1, 0, 0)