Initial import (#1689494).
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
%global srcname xarray
|
||||
%global data_commit 870b5d7a9dbfa821423f1b88056890c22341f085
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.12.0
|
||||
Release: 1%{?dist}
|
||||
Summary: N-D labeled arrays and datasets in Python
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/pydata/xarray
|
||||
Source0: %pypi_source
|
||||
# Data for examples only.
|
||||
Source1: https://github.com/pydata/xarray-data/archive/%{data_commit}/xarray-data-%{data_commit}.tar.gz
|
||||
Source2: https://github.com/mapbox/rasterio/raw/1.0.21/tests/data/RGB.byte.tif
|
||||
# All Fedora specific.
|
||||
Patch0001: 0001-DOC-Don-t-download-RGB.byte.tif-during-build.patch
|
||||
Patch0002: 0002-DOC-Skip-examples-using-unpackaged-dependencies.patch
|
||||
Patch0003: 0003-TST-Reduce-required-pytest-runner-version.patch
|
||||
Patch0004: 0004-DOC-Don-t-print-out-conda-pip-environment.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-dask+array
|
||||
BuildRequires: python3-dask+dataframe
|
||||
BuildRequires: python3dist(numpy) >= 1.12
|
||||
BuildRequires: python3dist(numpydoc)
|
||||
BuildRequires: python3dist(pandas) >= 0.19.2
|
||||
BuildRequires: python3dist(pytest) >= 2.7.1
|
||||
BuildRequires: python3dist(pytest-runner)
|
||||
BuildRequires: python3dist(pytest-xdist)
|
||||
BuildRequires: python3dist(seaborn)
|
||||
BuildRequires: python3dist(setuptools)
|
||||
|
||||
%global _description %{expand: \
|
||||
Xarray (formerly xray) is an open source project and Python package that
|
||||
makes working with labelled multi-dimensional arrays simple, efficient,
|
||||
and fun!
|
||||
|
||||
Xarray introduces labels in the form of dimensions, coordinates and
|
||||
attributes on top of raw NumPy-like arrays, which allows for a more
|
||||
intuitive, more concise, and less error-prone developer experience. The
|
||||
package includes a large and growing library of domain-agnostic functions
|
||||
for advanced analytics and visualization with these data structures.
|
||||
|
||||
Xarray was inspired by and borrows heavily from pandas, the popular data
|
||||
analysis package focused on labelled tabular data. It is particularly
|
||||
tailored to working with netCDF files, which were the source of xarray's
|
||||
data model, and integrates tightly with dask for parallel computing.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
%description -n python3-%{srcname} %{_description}
|
||||
|
||||
|
||||
%package -n python-%{srcname}-doc
|
||||
Summary: xarray documentation
|
||||
|
||||
BuildRequires: python3dist(cartopy)
|
||||
BuildRequires: natural-earth-map-data-110m
|
||||
BuildRequires: natural-earth-map-data-10m
|
||||
BuildRequires: python3-ipython-sphinx
|
||||
BuildRequires: python3dist(matplotlib)
|
||||
BuildRequires: python3dist(netcdf4)
|
||||
BuildRequires: python3dist(rasterio)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinx-gallery)
|
||||
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||
BuildRequires: python3dist(zarr)
|
||||
|
||||
%description -n python-%{srcname}-doc
|
||||
Documentation for xarray
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
|
||||
# Provide example datasets for building docs.
|
||||
tar xf %SOURCE1 --transform='s~^\(%{srcname}-data-%{data_commit}/\)~\1.xarray_tutorial_data/~'
|
||||
cp -p %SOURCE2 ./doc/gallery/
|
||||
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{srcname}.egg-info
|
||||
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
# generate html docs
|
||||
pushd doc
|
||||
PYTHONPATH=${PWD}/.. HOME=${PWD}/../%{srcname}-data-%{data_commit} make html
|
||||
# remove the sphinx-build leftovers
|
||||
rm -rf _build/html/.{doctrees,buildinfo}
|
||||
popd
|
||||
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
|
||||
%check
|
||||
%{__python3} setup.py test --addopts='-ra -n auto'
|
||||
|
||||
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/%{srcname}
|
||||
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
||||
|
||||
%files -n python-%{srcname}-doc
|
||||
%doc doc/_build/html
|
||||
%license LICENSE
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Mar 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.12.0-1
|
||||
- Initial package.
|
||||
Reference in New Issue
Block a user