mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-31 04:11:28 +01:00
Add __version__ variable for python library (#308)
[PEP 396](https://peps.python.org/pep-0396/) --------- Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch>
This commit is contained in:
1 parent
41c47cb54b
commit
282debcc94
3 files changed
+10
No files matched your search
@@ -13,6 +13,7 @@ from ._aare import corner
|
||||
|
||||
# from ._aare import ClusterFinderMT, ClusterCollector, ClusterFileSink, ClusterVector_i
|
||||
|
||||
from ._version import __version__
|
||||
from .ClusterFinder import ClusterFinder, ClusterCollector, ClusterFinderMT, ClusterFileSink, ClusterFile
|
||||
from .ClusterVector import ClusterVector
|
||||
from .Cluster import Cluster
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# This file is used to get the version of the package from the VERSION file
|
||||
from importlib.metadata import PackageNotFoundError, version
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
__version__ = version('aare')
|
||||
except PackageNotFoundError:
|
||||
__version__ = Path(__file__).parents[2].joinpath('VERSION').read_text().strip()
|
||||
Reference in new issue
Block a user