2
0
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:
Peter Hamilton
2015-06-24 12:31:53 -04:00
parent ef58a8f90b
commit b38b58c2f4
3 changed files with 50 additions and 2 deletions

View File

@@ -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')