mirror of
https://github.com/openkmip/pykmip
synced 2026-01-03 00:53:16 +00:00
Fixing relative path bug when looking up library version
This change fixes the use of relative paths used to fetch the PyKMIP library version number in kmip/__init__.py and setup.py. The absolute path of the file is now dynamically generated and used instead. Tests are included to verify that the __version__ attribute is set properly.
This commit is contained in:
@@ -17,7 +17,9 @@ import logging.config
|
||||
import os
|
||||
import sys
|
||||
|
||||
exec(open('kmip/version.py').read())
|
||||
version = os.path.join(os.path.dirname(
|
||||
os.path.realpath(__file__)), 'version.py')
|
||||
exec(open(version).read())
|
||||
|
||||
path = os.path.join(os.path.dirname(__file__), 'logconfig.ini')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user