diff --git a/python/hyperon/__init__.py b/python/hyperon/__init__.py index f6f9b7973..c6763cee4 100644 --- a/python/hyperon/__init__.py +++ b/python/hyperon/__init__.py @@ -1,12 +1,12 @@ from .atoms import * from .base import * from .runner import * -from ._version import __version__ as _ver -if _ver is None: +try: + from ._version import __version__ as _ver + __version__ = _ver +except Exception: from pathlib import Path path = Path(__file__).parent / "../VERSION" with path.open() as f: ver = f.read().splitlines()[0].split("'")[1] - __version__ = ver + "+localbuild" -else: - __version__ = _ver \ No newline at end of file + __version__ = ver + "+localbuild" \ No newline at end of file diff --git a/python/hyperon/_version.py b/python/hyperon/_version.py deleted file mode 100644 index c8ffb60db..000000000 --- a/python/hyperon/_version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = None \ No newline at end of file