From 009a47ad7255f54dd8d7fd0bf719b83930ad53d2 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 25 Apr 2019 20:02:48 +0200 Subject: [PATCH] make python package independent from rest of DAMASK https://packaging.python.org/guides/single-sourcing-package-version/ --- python/damask/VERSION | 1 + python/damask/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 120000 python/damask/VERSION diff --git a/python/damask/VERSION b/python/damask/VERSION new file mode 120000 index 000000000..558194c5a --- /dev/null +++ b/python/damask/VERSION @@ -0,0 +1 @@ +../../VERSION \ No newline at end of file diff --git a/python/damask/__init__.py b/python/damask/__init__.py index d7ed4a9f9..a57d450d8 100644 --- a/python/damask/__init__.py +++ b/python/damask/__init__.py @@ -3,8 +3,8 @@ """Main aggregator""" import os -with open(os.path.join(os.path.dirname(__file__),'../../VERSION')) as f: - version = f.readline()[:-1] +with open(os.path.join(os.path.dirname(__file__),'VERSION')) as f: + version = f.readline()[1:-1] name = 'damask'