2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 07:43:26 +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

@@ -13,9 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import setuptools
exec(open('kmip/version.py').read())
version = os.path.join(os.path.dirname(
os.path.realpath(__file__)), 'kmip', 'version.py')
exec(open(version).read())
setuptools.setup(
name='PyKMIP',