-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #667 from DaddyWesker/main
Issue 662 solution, hyperon version refactor
- Loading branch information
Showing
6 changed files
with
33 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ __pycache__ | |
/*.so | ||
/*.dylib | ||
/wheelhouse | ||
/hyperon/_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
'0.1.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
from .atoms import * | ||
from .base import * | ||
from .runner import * | ||
from ._version import __version__ as _ver | ||
|
||
def _version(dist_name): | ||
try: | ||
import sys | ||
if sys.version_info[:2] >= (3, 8): | ||
# TODO: Import directly (no need for conditional) when `python_requires = >= 3.8` | ||
from importlib.metadata import PackageNotFoundError, version # pragma: no cover | ||
else: | ||
from importlib_metadata import PackageNotFoundError, version # pragma: no cover | ||
return version(dist_name) | ||
except: | ||
return "0.1.8+localbuild" | ||
|
||
__version__ = _version(__name__) | ||
|
||
if _ver is None: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters