Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 47f89f1

Browse files
committed
try to fix package version
1 parent e56ea56 commit 47f89f1

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

datatree/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# flake8: noqa
22
# Ignoring F401: imported but unused
3+
4+
from pkg_resources import DistributionNotFound, get_distribution
5+
6+
# import public API
37
from .datatree import DataTree
48
from .io import open_datatree
59
from .mapping import map_over_subtree
10+
11+
try:
12+
__version__ = get_distribution(__name__).version
13+
except DistributionNotFound: # noqa: F401; pragma: no cover
14+
# package is not installed
15+
pass

setup.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
setup(
1616
name="datatree",
17-
version="0.0.1",
1817
description="Hierarchical tree-like data structures for xarray",
1918
long_description=long_description,
2019
url="https://github.com/xarray-contrib/datatree",
@@ -34,10 +33,6 @@
3433
packages=find_packages(exclude=["docs", "tests", "tests.*", "docs.*"]),
3534
install_requires=install_requires,
3635
python_requires=">=3.9",
37-
setup_requires="setuptools_scm",
38-
use_scm_version={
39-
"write_to": "datatree/_version.py",
40-
"write_to_template": '__version__ = "{version}"',
41-
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
42-
},
36+
use_scm_version={"version_scheme": "post-release", "local_scheme": "dirty-tag"},
37+
setup_requires=["setuptools_scm>=3.4", "setuptools>=42"],
4338
)

0 commit comments

Comments
 (0)