-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecating CI for python version 3.7
- Loading branch information
Showing
2 changed files
with
11 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
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,10 +1,6 @@ | ||
from pkg_resources import DistributionNotFound, get_distribution # type: ignore | ||
|
||
# TODO change pkg_resources with importlib.metadata, as described here | ||
# https://pypi.org/project/setuptools-scm/#:~:text=Retrieving%20package%20version%20at%20runtime, when we stop | ||
# supporting Python 3.7. We the aforementioned change, we can avoid the 100ms overhead during import of the package. | ||
import importlib.metadata | ||
|
||
try: | ||
__version__ = get_distribution("tiledb-ml").version | ||
except DistributionNotFound: | ||
__version__ = "" | ||
__version__ = importlib.metadata.version("tiledb-ml") | ||
except importlib.metadata.PackageNotFoundError: | ||
__version__ = "" |