Skip to content

Commit bbbdd37

Browse files
authored
Merge pull request #39 from ecmwf/fix/relative-python-path
Update pygribjump versioning
2 parents f8f70e3 + f8576fb commit bbbdd37

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

pygribjump/src/pygribjump/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

pygribjump/src/pygribjump/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from pathlib import Path
22
from .pygribjump import *
3+
import importlib.metadata
34

4-
with open(Path(__file__).parent / "VERSION") as f:
5-
__version__ = f.read().strip()
5+
__version__ = importlib.metadata.version("pygribjump")

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ include-package-data = true
4545
zip-safe = false
4646

4747
[tool.setuptools.package-data]
48-
"pygribjump" = ["VERSION", "pygribjump/src/pygribjump/gribjump_c.h"]
48+
"pygribjump" = [
49+
"VERSION",
50+
"gribjump_c.h"
51+
]

0 commit comments

Comments
 (0)