Skip to content

Commit

Permalink
PKG: Explicitly add setuptools dependency (#3628)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
hoechenberger and crusaderky authored Jan 30, 2020
1 parent e9412b9 commit 95e4f6c
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dependencies:
- rasterio
- scipy
- seaborn
- setuptools
- sparse
- toolz
- xarray
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- pandas
- rasterio
- seaborn
- setuptools
- sphinx
- sphinx_rtd_theme
- zarr
1 change: 1 addition & 0 deletions ci/requirements/py36-bare-minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dependencies:
- pytest-env
- numpy=1.15
- pandas=0.25
- setuptools=41.2
1 change: 1 addition & 0 deletions ci/requirements/py36-min-all-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies:
- rasterio=1.0
- scipy=1.3
- seaborn=0.9
- setuptools=41.2
# - sparse # See py36-min-nep18.yml
- toolz=0.10
- zarr=2.3
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/py36-min-nep18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ dependencies:
- pytest-cov
- pytest-env
- scipy=1.2
- setuptools=41.2
- sparse=0.8
1 change: 1 addition & 0 deletions ci/requirements/py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies:
- rasterio
- scipy
- seaborn
- setuptools
- sparse
- toolz
- zarr
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/py37-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies:
- rasterio
- scipy
- seaborn
- setuptools
- sparse
- toolz
- zarr
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies:
- rasterio
- scipy
- seaborn
- setuptools
- sparse
- toolz
- zarr
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
dependencies:
- python=3.8
- setuptools
- pip
- pip:
- coveralls
Expand Down
1 change: 1 addition & 0 deletions doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Required dependencies
---------------------

- Python (3.6 or later)
- setuptools
- `numpy <http://www.numpy.org/>`__ (1.15 or later)
- `pandas <http://pandas.pydata.org/>`__ (0.25 or later)

Expand Down
2 changes: 2 additions & 0 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ Bug fixes
- Allow plotting of binned coordinates on the y axis in :py:meth:`plot.line`
and :py:meth:`plot.step` plots (:issue:`3571`,
:pull:`3685`) by `Julien Seguinot <https://github.com/juseg>`_.
- setuptools is now marked as a dependency of xarray
(:pull:`3628`) by `Richard Höchenberger <https://github.com/hoechenberger>`_.

Documentation
~~~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

numpy >= 1.15
pandas >= 0.25
setuptools >= 41.2
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ python_requires = >=3.6
install_requires =
numpy >= 1.15
pandas >= 0.25
setup_requires = setuptools_scm
setuptools >= 41.2 # For pkg_resources
setup_requires =
setuptools >= 41.2
setuptools_scm

[options.package_data]
xarray =
Expand Down
6 changes: 3 additions & 3 deletions xarray/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pkg_resources

from . import testing, tutorial, ufuncs
from .backends.api import (
load_dataarray,
Expand Down Expand Up @@ -27,11 +29,9 @@
from .util.print_versions import show_versions

try:
import pkg_resources

__version__ = pkg_resources.get_distribution("xarray").version
except Exception:
# Local copy, not installed with setuptools, or setuptools is not available.
# Local copy or not installed with setuptools.
# Disable minimum version checks on downstream libraries.
__version__ = "999"

Expand Down

0 comments on commit 95e4f6c

Please sign in to comment.