mirror of https://github.com/OpenKMIP/PyKMIP.git
Merge pull request #40 from OpenKMIP/bug/fix-file-handle-for-versions
Fixing bug with dangling file handle when setting __version__
This commit is contained in:
commit
b8fe858782
|
@ -17,9 +17,11 @@ import logging.config
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
version = os.path.join(os.path.dirname(
|
# Dynamically set __version__
|
||||||
|
version_path = os.path.join(os.path.dirname(
|
||||||
os.path.realpath(__file__)), 'version.py')
|
os.path.realpath(__file__)), 'version.py')
|
||||||
exec(open(version).read())
|
with open(version_path, 'r') as version_file:
|
||||||
|
exec(version_file.read())
|
||||||
|
|
||||||
path = os.path.join(os.path.dirname(__file__), 'logconfig.ini')
|
path = os.path.join(os.path.dirname(__file__), 'logconfig.ini')
|
||||||
|
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -16,9 +16,11 @@
|
||||||
import os
|
import os
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
version = os.path.join(os.path.dirname(
|
# Dynamically set __version__
|
||||||
|
version_path = os.path.join(os.path.dirname(
|
||||||
os.path.realpath(__file__)), 'kmip', 'version.py')
|
os.path.realpath(__file__)), 'kmip', 'version.py')
|
||||||
exec(open(version).read())
|
with open(version_path, 'r') as version_file:
|
||||||
|
exec(version_file.read())
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='PyKMIP',
|
name='PyKMIP',
|
||||||
|
|
Loading…
Reference in New Issue