mirror of
https://github.com/OpenKMIP/PyKMIP.git
synced 2025-07-23 05:54:23 +02:00
Merge pull request #93 from OpenKMIP/feat/update-version-handling
Updating version handling
This commit is contained in:
commit
686b929062
@ -15,13 +15,15 @@
|
|||||||
|
|
||||||
import logging.config
|
import logging.config
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Dynamically set __version__
|
# Dynamically set __version__
|
||||||
version_path = os.path.join(os.path.dirname(
|
version_path = os.path.join(os.path.dirname(
|
||||||
os.path.realpath(__file__)), 'version.py')
|
os.path.realpath(__file__)), 'version.py')
|
||||||
with open(version_path, 'r') as version_file:
|
with open(version_path, 'r') as version_file:
|
||||||
exec(version_file.read())
|
mo = re.search(r"^.*= '(\d\.\d\.\d)'$", version_file.read(), re.MULTILINE)
|
||||||
|
__version__ = mo.group(1)
|
||||||
|
|
||||||
path = os.path.join(os.path.dirname(__file__), 'logconfig.ini')
|
path = os.path.join(os.path.dirname(__file__), 'logconfig.ini')
|
||||||
|
|
||||||
|
4
setup.py
4
setup.py
@ -14,13 +14,15 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
# Dynamically set __version__
|
# Dynamically set __version__
|
||||||
version_path = os.path.join(os.path.dirname(
|
version_path = os.path.join(os.path.dirname(
|
||||||
os.path.realpath(__file__)), 'kmip', 'version.py')
|
os.path.realpath(__file__)), 'kmip', 'version.py')
|
||||||
with open(version_path, 'r') as version_file:
|
with open(version_path, 'r') as version_file:
|
||||||
exec(version_file.read())
|
mo = re.search(r"^.*= '(\d\.\d\.\d)'$", version_file.read(), re.MULTILINE)
|
||||||
|
__version__ = mo.group(1)
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='PyKMIP',
|
name='PyKMIP',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user