Skip to content

Commit 1d412b0

Browse files
EliEli
authored andcommitted
Merge branch 'feature-meshopt'
2 parents c19d7fd + 1770326 commit 1d412b0

5 files changed

Lines changed: 2346 additions & 27 deletions

File tree

schimpy/__init__.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
"""Top-level package for schimpy."""
2-
31
__author__ = """Eli Ateljevich, Kijin Nam"""
42
__email__ = "Eli.Ateljevich@water.ca.gov; Kijin.Nam@water.ca.gov"
53

64
try:
7-
from ._version import __version__
5+
from importlib.metadata import version, PackageNotFoundError
86
except ImportError:
9-
__version__ = "0.0.0" # fallback for weird dev cases
7+
from pkg_resources import get_distribution, DistributionNotFound
8+
def version(pkg): return get_distribution(pkg).version
9+
PackageNotFoundError = DistributionNotFound
10+
11+
try:
12+
__version__ = version("schimpy")
13+
except PackageNotFoundError:
14+
# Fallback for running from a VCS checkout without installation
15+
try:
16+
from setuptools_scm import get_version
17+
__version__ = get_version(root="..", relative_to=__file__)
18+
except Exception:
19+
__version__ = "unknown"

0 commit comments

Comments
 (0)