diff --git a/python/damask/_colormap.py b/python/damask/_colormap.py index b95253189..73e7d0936 100644 --- a/python/damask/_colormap.py +++ b/python/damask/_colormap.py @@ -1,3 +1,4 @@ +import os import json import functools diff --git a/python/setup.py b/python/setup.py index a1b5ea166..798d8e4bf 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,8 +1,8 @@ import setuptools -import os +from pathlib import Path import re -with open(os.path.join(os.path.dirname(__file__),'damask/VERSION')) as f: +with open(Path(__file__).parent/'damask/VERSION') as f: version = re.sub(r'(-([^-]*)).*$',r'.\2',re.sub(r'^v(\d+\.\d+(\.\d+)?)',r'\1',f.readline().strip())) setuptools.setup(