Skip to content
Snippets Groups Projects
Commit d9bdf16b authored by Philipp Arras's avatar Philipp Arras
Browse files

Remove gitversion interface

parent ec726ff5
No related branches found
No related tags found
2 merge requests!659Nifty7 changes,!657Remove gitversion interface, docs improvements and workaround pip
Pipeline #105228 passed
...@@ -93,6 +93,13 @@ likelihood becomes the identity matrix. This is needed for the `GeoMetricKL` ...@@ -93,6 +93,13 @@ likelihood becomes the identity matrix. This is needed for the `GeoMetricKL`
algorithm. algorithm.
Remove gitversion interface
---------------------------
Since we provide proper nifty releases on PyPI now, the gitversion interface is
not supported any longer.
Changes since NIFTy 5 Changes since NIFTy 5
===================== =====================
......
...@@ -18,21 +18,6 @@ ...@@ -18,21 +18,6 @@
from setuptools import find_packages, setup from setuptools import find_packages, setup
import os import os
def write_version():
import subprocess
try:
p = subprocess.Popen(["git", "describe", "--dirty", "--tags", "--always"],
stdout=subprocess.PIPE)
res = p.communicate()[0].strip().decode('utf-8')
except FileNotFoundError:
print("Could not determine version string from git history")
res = "unknown"
with open(os.path.join("nifty7", "git_version.py"), "w") as f:
f.write('gitversion = "{}"\n'.format(res))
write_version()
exec(open('nifty7/version.py').read()) exec(open('nifty7/version.py').read())
with open("README.md") as f: with open("README.md") as f:
......
# Store the version here so:
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module
__version__ = '7.0' __version__ = '7.0'
def gitversion():
try:
from .git_version import gitversion
except ImportError:
return "unknown"
return gitversion
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment