object oriented path handling
This commit is contained in:
parent
fa7f7e6fa4
commit
9225d439ab
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
import json
|
import json
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import setuptools
|
import setuptools
|
||||||
import os
|
from pathlib import Path
|
||||||
import re
|
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()))
|
version = re.sub(r'(-([^-]*)).*$',r'.\2',re.sub(r'^v(\d+\.\d+(\.\d+)?)',r'\1',f.readline().strip()))
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
|
|
Loading…
Reference in New Issue