Skip to content

Commit 3eff798

Browse files
committed
Add __version__ to __init__ and update python dep in pyproject.toml
1 parent 9ec4fca commit 3eff798

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
description = "Efficient random sampling via linear interpolation."
1111
readme = "README.md"
12-
requires-python = ">=3.6"
12+
requires-python = ">=3.8"
1313
dependencies = [
1414
"numpy>=1.17,<2.0",
1515
"scipy>=1.9,<2.0",

src/lintsampler/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
from .gridsample import gridsample
22
from .sample import sample
3+
from importlib.metadata import version, PackageNotFoundError
4+
5+
try:
6+
__version__ = version("lintsampler")
7+
except PackageNotFoundError:
8+
__version__ = "unknown version"
39

410
__all__ = ["gridsample", "sample"]

0 commit comments

Comments
 (0)