Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG: Explicitly add setuptools dependency #3628

Merged
merged 6 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -129,6 +129,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 @@ -81,7 +81,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