Blame python-xarray.spec

45d03f9
%global srcname xarray
45d03f9
%global data_commit 870b5d7a9dbfa821423f1b88056890c22341f085
45d03f9
e818d8f
%bcond_with docs
e818d8f
45d03f9
Name:           python-%{srcname}
11f4833
Version:        0.15.1
b7026ce
Release:        2%{?dist}
45d03f9
Summary:        N-D labeled arrays and datasets in Python
45d03f9
45d03f9
License:        ASL 2.0
45d03f9
URL:            https://github.com/pydata/xarray
45d03f9
Source0:        %pypi_source
45d03f9
# Data for examples only.
45d03f9
Source1:        https://github.com/pydata/xarray-data/archive/%{data_commit}/xarray-data-%{data_commit}.tar.gz
45d03f9
Source2:        https://github.com/mapbox/rasterio/raw/1.0.21/tests/data/RGB.byte.tif
45d03f9
# All Fedora specific.
45d03f9
Patch0001:      0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch
45d03f9
Patch0002:      0002-DOC-Skip-examples-using-unpackaged-dependencies.patch
618c5a4
Patch0003:      0003-DOC-Don-t-print-out-conda-pip-environment.patch
6aeeebb
# https://github.com/pydata/xarray/pull/3274
618c5a4
Patch0004:      0004-Use-drawstyle-instead-of-linestyle-in-plot.step.patch
45d03f9
45d03f9
BuildArch:      noarch
45d03f9
45d03f9
BuildRequires:  python3-devel
45d03f9
BuildRequires:  python3-dask+array
45d03f9
BuildRequires:  python3-dask+dataframe
618c5a4
BuildRequires:  python3dist(numpy) >= 1.15
618c5a4
BuildRequires:  python3dist(pandas) >= 0.25
45d03f9
BuildRequires:  python3dist(pytest) >= 2.7.1
45d03f9
BuildRequires:  python3dist(pytest-xdist)
45d03f9
BuildRequires:  python3dist(seaborn)
45d03f9
BuildRequires:  python3dist(setuptools)
618c5a4
BuildRequires:  python3dist(setuptools-scm)
45d03f9
45d03f9
%global _description %{expand: \
45d03f9
Xarray (formerly xray) is an open source project and Python package that
45d03f9
makes working with labelled multi-dimensional arrays simple, efficient,
45d03f9
and fun!
45d03f9
45d03f9
Xarray introduces labels in the form of dimensions, coordinates and
45d03f9
attributes on top of raw NumPy-like arrays, which allows for a more
45d03f9
intuitive, more concise, and less error-prone developer experience. The
45d03f9
package includes a large and growing library of domain-agnostic functions
45d03f9
for advanced analytics and visualization with these data structures.
45d03f9
45d03f9
Xarray was inspired by and borrows heavily from pandas, the popular data
45d03f9
analysis package focused on labelled tabular data. It is particularly
45d03f9
tailored to working with netCDF files, which were the source of xarray's
45d03f9
data model, and integrates tightly with dask for parallel computing.}
45d03f9
45d03f9
%description %{_description}
45d03f9
45d03f9
45d03f9
%package -n     python3-%{srcname}
45d03f9
Summary:        %{summary}
45d03f9
%{?python_provide:%python_provide python3-%{srcname}}
45d03f9
45d03f9
%description -n python3-%{srcname} %{_description}
45d03f9
45d03f9
e818d8f
%if %{with docs}
45d03f9
%package -n python-%{srcname}-doc
45d03f9
Summary:        xarray documentation
45d03f9
45d03f9
BuildRequires:  python3dist(cartopy)
45d03f9
BuildRequires:  natural-earth-map-data-110m
45d03f9
BuildRequires:  natural-earth-map-data-10m
45d03f9
BuildRequires:  python3-ipython-sphinx
618c5a4
BuildRequires:  python3dist(jupyter-client)
45d03f9
BuildRequires:  python3dist(matplotlib)
45d03f9
BuildRequires:  python3dist(netcdf4)
d06712b
BuildRequires:  python3dist(numpydoc)
45d03f9
BuildRequires:  python3dist(rasterio)
45d03f9
BuildRequires:  python3dist(sphinx)
45d03f9
BuildRequires:  python3dist(sphinx-gallery)
45d03f9
BuildRequires:  python3dist(sphinx-rtd-theme)
45d03f9
BuildRequires:  python3dist(zarr)
45d03f9
45d03f9
%description -n python-%{srcname}-doc
45d03f9
Documentation for xarray
e818d8f
%endif
45d03f9
45d03f9
45d03f9
%prep
45d03f9
%autosetup -n %{srcname}-%{version} -p1
45d03f9
e818d8f
%if %{with docs}
45d03f9
# Provide example datasets for building docs.
45d03f9
tar xf %SOURCE1 --transform='s~^\(%{srcname}-data-%{data_commit}/\)~\1.xarray_tutorial_data/~'
45d03f9
cp -p %SOURCE2 ./doc/gallery/
e818d8f
%endif
45d03f9
45d03f9
45d03f9
%build
45d03f9
%py3_build
45d03f9
e818d8f
%if %{with docs}
45d03f9
# generate html docs
45d03f9
pushd doc
45d03f9
PYTHONPATH=${PWD}/.. HOME=${PWD}/../%{srcname}-data-%{data_commit} make html
45d03f9
# remove the sphinx-build leftovers
45d03f9
rm -rf _build/html/.{doctrees,buildinfo}
45d03f9
popd
e818d8f
%endif
45d03f9
45d03f9
45d03f9
%install
45d03f9
%py3_install
45d03f9
45d03f9
45d03f9
%check
b7026ce
rm -rf xarray
b7026ce
PYTHONPATH=%{buildroot}%{python3_sitelib} \
b7026ce
    pytest-3 -ra -n auto -m "not network" --pyargs xarray
45d03f9
45d03f9
45d03f9
%files -n python3-%{srcname}
d06712b
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
45d03f9
%doc README.rst
45d03f9
%{python3_sitelib}/%{srcname}
b7026ce
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
45d03f9
e818d8f
%if %{with docs}
45d03f9
%files -n python-%{srcname}-doc
45d03f9
%doc doc/_build/html
d06712b
%license LICENSE licenses/DASK_LICENSE licenses/NUMPY_LICENSE licenses/PANDAS_LICENSE licenses/PYTHON_LICENSE licenses/SEABORN_LICENSE
e818d8f
%endif
45d03f9
45d03f9
45d03f9
%changelog
b7026ce
* Sat Apr 18 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.1-2
b7026ce
- Fix broken install with missing files
b7026ce
- Test against installed version to catch above issue
b7026ce
11f4833
* Wed Mar 25 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.1-1
11f4833
- Update to latest version
11f4833
9fd7859
* Fri Mar 06 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-2
9fd7859
- Backport fix for seaborn 0.10.0
9fd7859
618c5a4
* Sat Feb 08 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.15.0-1
618c5a4
- Update to latest version
618c5a4
6e3bbda
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-4
6e3bbda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6e3bbda
757e1e4
* Mon Aug 19 2019 Miro HronĨok <mhroncok@redhat.com> - 0.12.3-3
757e1e4
- Rebuilt for Python 3.8
757e1e4
497faee
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.3-2
497faee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
497faee
d06712b
* Sun Jul 21 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.3-1
d06712b
- Update to latest version
d06712b
45d03f9
* Sat Mar 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
45d03f9
- Initial package.