Skip to content

Commit 8ef76a6

Browse files
committed
fix: move __version__ variable to be accesible from setup.py
1 parent 2566272 commit 8ef76a6

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testpaths = tests
33
addopts = -p no:warnings
44

55
[semantic_release]
6-
version_variable = time_tracker_api/__init__.py:__version__
6+
version_variable = time_tracker_api/version.py:__version__
77
upload_to_pypi = false
88
remove_dist = false
99

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
def get_version() -> str:
66
version = {}
7-
path_to_file_with_version = "time_tracker_api/__init__.py"
7+
path_to_file_with_version = "time_tracker_api/version.py"
88
try:
99
with open(path_to_file_with_version) as fp:
1010
exec(fp.read(), version)

time_tracker_api/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from flask import Flask
55

6-
__version__ = '0.3.0'
76

87
flask_app: Flask = None
98

time_tracker_api/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from flask_restplus._http import HTTPStatus
66

77
from commons.data_access_layer.cosmos_db import CustomError
8-
from time_tracker_api import __version__
8+
from time_tracker_api.version import __version__
99

1010
faker = Faker()
1111

time_tracker_api/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.3.0'

0 commit comments

Comments
 (0)