Skip to content

Commit

Permalink
Of course, the extension shouldn't be part of the import...
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Sep 20, 2024
1 parent bf48c2f commit 5095c4f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions eessi/testsuite/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from importlib.metadata import version, PackageNotFoundError
# If this is an installed package, setuptools_scm should have written the file _version.py in the current directory
try:
from . import _version.py
from . import _version
except ImportError:
# We probably no longer needed this: if it is an installed package, we can read the version from _version.py
# try:
# __version__ = version("eessi-testsuite")
# except PackageNotFoundError:
# Fallback for when it is not an installed package, but is a git clone
# Fallback for when the package is not installed, but git cloned. Note that this requires setuptools_scm to be
# available as a runtime dependency
try:
from setuptools_scm import get_version
# Using a relative path for relative_to doesn't work, because it will be relative to the current working
Expand Down

0 comments on commit 5095c4f

Please sign in to comment.