Make version available in code (#282)
It seems like there are multi ways to achieve that, all of them highliting the importance of maintain a single source of truth for the version number. More info: https://packaging.python.org/guides/single-sourcing-package-version/. This PR includes one possible approach, open to discussion.
This commit is contained in:
parent
02a17e10d5
commit
d21d8c29b0
1
oidc_provider/version.py
Normal file
1
oidc_provider/version.py
Normal file
|
@ -0,0 +1 @@
|
|||
__version__ = '0.6.2'
|
5
setup.py
5
setup.py
|
@ -4,13 +4,16 @@ from setuptools import (
|
|||
setup,
|
||||
)
|
||||
|
||||
version = {}
|
||||
with open("./oidc_provider/version.py") as fp:
|
||||
exec(fp.read(), version)
|
||||
|
||||
# allow setup.py to be run from any path
|
||||
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
|
||||
|
||||
setup(
|
||||
name='django-oidc-provider',
|
||||
version='0.6.2',
|
||||
version=version['__version__'],
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
license='MIT License',
|
||||
|
|
Loading…
Reference in a new issue