We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff9c29f commit 28e4dc6Copy full SHA for 28e4dc6
setup.py
@@ -1,7 +1,23 @@
1
from setuptools import setup, find_packages
2
+import sys
3
+
4
5
+def get_version() -> str:
6
+ version = {}
7
+ path_to_file_with_version = "time_tracker_api/__init__.py"
8
+ try:
9
+ with open(path_to_file_with_version) as fp:
10
+ exec(fp.read(), version)
11
+ __version__ = version['__version__']
12
+ return __version__
13
+ except KeyError:
14
+ print(f'Error: No variable ___version___ in {path_to_file_with_version}')
15
+ sys.exit()
16
17
18
setup(
19
name="time-tracker-backend",
20
+ version=get_version(),
21
packages=find_packages(),
22
include_package_data=True,
23
)
0 commit comments