Skip to content

Commit 95e4f6c

Browse files
PKG: Explicitly add setuptools dependency (#3628)
* PKG: Explicitly add setuptools dependency * PKG: Remove setuptools MONTHS policy * Code review * Display setuptools in github dependency graph * setuptools minimum version Co-authored-by: crusaderky <[email protected]>
1 parent e9412b9 commit 95e4f6c

14 files changed

+20
-4
lines changed

.binder/environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies:
3131
- rasterio
3232
- scipy
3333
- seaborn
34+
- setuptools
3435
- sparse
3536
- toolz
3637
- xarray

ci/requirements/doc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ dependencies:
2020
- pandas
2121
- rasterio
2222
- seaborn
23+
- setuptools
2324
- sphinx
2425
- sphinx_rtd_theme
2526
- zarr

ci/requirements/py36-bare-minimum.yml

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ dependencies:
1010
- pytest-env
1111
- numpy=1.15
1212
- pandas=0.25
13+
- setuptools=41.2

ci/requirements/py36-min-all-deps.yml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ dependencies:
4343
- rasterio=1.0
4444
- scipy=1.3
4545
- seaborn=0.9
46+
- setuptools=41.2
4647
# - sparse # See py36-min-nep18.yml
4748
- toolz=0.10
4849
- zarr=2.3

ci/requirements/py36-min-nep18.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ dependencies:
1616
- pytest-cov
1717
- pytest-env
1818
- scipy=1.2
19+
- setuptools=41.2
1920
- sparse=0.8

ci/requirements/py36.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies:
3939
- rasterio
4040
- scipy
4141
- seaborn
42+
- setuptools
4243
- sparse
4344
- toolz
4445
- zarr

ci/requirements/py37-windows.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies:
3939
- rasterio
4040
- scipy
4141
- seaborn
42+
- setuptools
4243
- sparse
4344
- toolz
4445
- zarr

ci/requirements/py37.yml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies:
3939
- rasterio
4040
- scipy
4141
- seaborn
42+
- setuptools
4243
- sparse
4344
- toolz
4445
- zarr

ci/requirements/py38.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3.8
6+
- setuptools
67
- pip
78
- pip:
89
- coveralls

doc/installing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Required dependencies
77
---------------------
88

99
- Python (3.6 or later)
10+
- setuptools
1011
- `numpy <http://www.numpy.org/>`__ (1.15 or later)
1112
- `pandas <http://pandas.pydata.org/>`__ (0.25 or later)
1213

doc/whats-new.rst

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ Bug fixes
150150
- Allow plotting of binned coordinates on the y axis in :py:meth:`plot.line`
151151
and :py:meth:`plot.step` plots (:issue:`3571`,
152152
:pull:`3685`) by `Julien Seguinot <https://github.com/juseg>`_.
153+
- setuptools is now marked as a dependency of xarray
154+
(:pull:`3628`) by `Richard Höchenberger <https://github.com/hoechenberger>`_.
153155

154156
Documentation
155157
~~~~~~~~~~~~~

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
numpy >= 1.15
66
pandas >= 0.25
7+
setuptools >= 41.2

setup.cfg

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ python_requires = >=3.6
7676
install_requires =
7777
numpy >= 1.15
7878
pandas >= 0.25
79-
setup_requires = setuptools_scm
79+
setuptools >= 41.2 # For pkg_resources
80+
setup_requires =
81+
setuptools >= 41.2
82+
setuptools_scm
8083

8184
[options.package_data]
8285
xarray =

xarray/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import pkg_resources
2+
13
from . import testing, tutorial, ufuncs
24
from .backends.api import (
35
load_dataarray,
@@ -27,11 +29,9 @@
2729
from .util.print_versions import show_versions
2830

2931
try:
30-
import pkg_resources
31-
3232
__version__ = pkg_resources.get_distribution("xarray").version
3333
except Exception:
34-
# Local copy, not installed with setuptools, or setuptools is not available.
34+
# Local copy or not installed with setuptools.
3535
# Disable minimum version checks on downstream libraries.
3636
__version__ = "999"
3737

0 commit comments

Comments
 (0)