Skip to content

Commit 588f3e8

Browse files
authored
Allow accessing version variables after initialization (#58)
* Allow accessing version variables after initialization This commit does two things: 1. Version variables are accessable by users after package initialization. Users can now use my_package.VERSION over exporting my_package.version, then accessing the version value, which makes things much easier. 2. Adapt changes made to version values to other parts of the project Version variables were renamed to the following: VERSION_SHORT ==> VERSION VERSION ==> RELEASE and parts referring to version values were changed accordingly, so nothing's broken. Signed-off-by: TheRealKeto <[email protected]> * Revert renaming versioning variables This commit reverts the change made to version variables, renaming them back to their original naming VERSION_SHORT <== VERSION VERSION <== RELEASE Signed-off-by: TheRealKeto <[email protected]> * Correctly use version variable in setup script Signed-off-by: TheRealKeto <[email protected]>
1 parent 7583238 commit 588f3e8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/source/conf.py

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

1919
sys.path.insert(0, os.path.abspath("../../"))
2020

21-
from my_package.version import VERSION, VERSION_SHORT # noqa: E402
21+
from my_package import VERSION, VERSION_SHORT # noqa: E402
2222

2323
# -- Project information -----------------------------------------------------
2424

my_package/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .version import VERSION, VERSION_SHORT

0 commit comments

Comments
 (0)