Commit d0242bf5 authored by Martin Reinecke's avatar Martin Reinecke

tweaks

parent adef4248
Pipeline #25820 canceled with stage
in 11 minutes and 6 seconds
......@@ -7,7 +7,7 @@ __version__ = '3.9.0'
def gitversion():
try:
from .git_version import get_gitversion
from .git_version import gitversion
except ImportError:
return "unknown"
return get_gitversion()
return gitversion
......@@ -18,18 +18,16 @@
from setuptools import setup, find_packages
exec(open('nifty4/version.py').read())
def write_version():
import subprocess
p = subprocess.Popen(["git", "describe", "--dirty"],
stdout=subprocess.PIPE)
res = p.communicate()[0].strip().decode('utf-8')
with open("nifty4/git_version.py", "w") as file:
file.write("def get_gitversion():\n")
file.write(' return "{}"\n'.format(res))
file.write('gitversion = "{}"\n'.format(res))
write_version()
exec(open('nifty4/version.py').read())
setup(name="nifty4",
version=__version__,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment