python-dask/python-dask.spec

259 lines
7.3 KiB
RPMSpec
Raw Normal View History

2019-03-07 00:58:51 +00:00
%global srcname dask
# Requires distributed, which is a loop.
2019-09-14 07:48:43 +00:00
# Also, some tests require packages that require dask itself.
2019-03-07 00:58:51 +00:00
# Force bootstrap for package review.
%bcond bootstrap 1
2024-06-26 22:04:34 +00:00
# We don't have all dependencies available yet.
%bcond docs 0
2019-03-07 00:58:51 +00:00
# We have an arched package to detect arch-dependent issues in dependencies,
# but all of the installable RPMs are noarch and there is no compiled code.
%global debug_package %{nil}
2019-03-07 00:58:51 +00:00
Name: python-%{srcname}
2024-08-07 04:26:30 +00:00
Version: 2024.8.0
%global tag 2024.8.0
Release: %autorelease -e 0.riscv64
2019-03-07 00:58:51 +00:00
Summary: Parallel PyData with Task Scheduling
2023-01-22 05:57:56 +00:00
License: BSD-3-Clause
2022-07-25 21:36:28 +00:00
URL: https://github.com/dask/dask
Source0: %{pypi_source %{srcname}}
2023-05-08 03:22:38 +00:00
# Fedora-specific patch.
Patch: 0001-Remove-extra-test-dependencies.patch
2019-03-07 00:58:51 +00:00
# Stop building on i686
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
2019-03-07 00:58:51 +00:00
%description
Dask is a flexible parallel computing library for analytics.
%package -n python3-%{srcname}
Summary: %{summary}
BuildArch: noarch
2019-03-07 00:58:51 +00:00
BuildRequires: python3-devel
BuildRequires: python3dist(graphviz)
BuildRequires: python3dist(ipython)
2019-07-23 06:43:50 +00:00
%if %{without bootstrap}
2019-09-14 07:48:43 +00:00
BuildRequires: python3dist(scikit-image)
BuildRequires: python3dist(xarray)
2019-03-07 00:58:51 +00:00
%endif
2019-09-14 07:48:43 +00:00
# Optional test requirements.
BuildRequires: python3dist(fastavro)
BuildRequires: python3dist(h5py)
BuildRequires: python3dist(psutil)
# libarrow tests don't pass on s390x either.
%ifnarch s390x
BuildRequires: python3dist(pyarrow)
%endif
2019-09-14 07:48:43 +00:00
BuildRequires: python3dist(requests)
BuildRequires: python3dist(sqlalchemy)
BuildRequires: python3dist(tables)
2019-09-14 07:48:43 +00:00
BuildRequires: python3dist(zarr)
2019-03-07 00:58:51 +00:00
Recommends: python3-%{srcname}+array = %{version}-%{release}
Recommends: python3-%{srcname}+bag = %{version}-%{release}
Recommends: python3-%{srcname}+dataframe = %{version}-%{release}
Recommends: python3-%{srcname}+delayed = %{version}-%{release}
2019-11-13 03:04:07 +00:00
%if %{without bootstrap}
Recommends: python3-%{srcname}+distributed = %{version}-%{release}
2019-11-13 03:04:07 +00:00
%endif
# No recent enough Bokeh is packaged
Obsoletes: python3-%{srcname}+diagnostics < 2022.5.0-1
# There is nothing that can be unbundled; there are some some snippets forked
2023-01-22 05:57:56 +00:00
# or copied from unspecified versions of numpy, under a BSD-3-Clause license
# similar to that of dask itself.
#
# - dask/array/numpy_compat.py:
# _Recurser, moveaxis, rollaxis, sliding_window_view
# - dask/array/backends.py:
# _tensordot
# - dask/array/core.py:
# block
# - dask/array/einsumfuncs.py:
# parse_einsum_input
# - dask/array/routines.py:
# cov, _average
Provides: bundled(numpy)
%description -n python3-%{srcname}
Dask is a flexible parallel computing library for analytics.
# Based on (but with BuildArch: noarch):
# %%pyproject_extras_subpkg -n python3-%%{srcname} array bag dataframe delayed
#
# Extras subpackages are arched, they should not be
# https://bugzilla.redhat.com/show_bug.cgi?id=2293727
#
# Further discussion is in
# https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/174.
%package -n python3-%{srcname}+array
Summary: Metapackage for python3-%{srcname}: array extras
Requires: python3-%{srcname} = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{srcname}+array
This is a metapackage bringing in array extras requires for python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+array -f %{_pyproject_ghost_distinfo}
%package -n python3-%{srcname}+bag
Summary: Metapackage for python3-%{srcname}: bag extras
Requires: python3-%{srcname} = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{srcname}+bag
This is a metapackage bringing in bag extras requires for python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+bag -f %{_pyproject_ghost_distinfo}
%package -n python3-%{srcname}+dataframe
Summary: Metapackage for python3-%{srcname}: dataframe extras
Requires: python3-%{srcname} = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{srcname}+dataframe
This is a metapackage bringing in dataframe extras requires for python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+dataframe -f %{_pyproject_ghost_distinfo}
%package -n python3-%{srcname}+delayed
Summary: Metapackage for python3-%{srcname}: delayed extras
Requires: python3-%{srcname} = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{srcname}+delayed
This is a metapackage bringing in delayed extras requires for python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+delayed -f %{_pyproject_ghost_distinfo}
2019-11-13 03:04:07 +00:00
%if %{without bootstrap}
# Based on (but with BuildArch: noarch):
# %%pyproject_extras_subpkg -n python3-%%{srcname} distributed
# (see comments for the other extras metapackages, above)
%package -n python3-%{srcname}+distributed
Summary: Metapackage for python3-%{srcname}: distributed extras
Requires: python3-%{srcname} = %{version}-%{release}
BuildArch: noarch
%description -n python3-%{srcname}+distributed
This is a metapackage bringing in distributed extras requires for python3-%{srcname}.
It makes sure the dependencies are installed.
%files -n python3-%{srcname}+distributed -f %{_pyproject_ghost_distinfo}
2019-11-13 03:04:07 +00:00
%endif
2019-03-07 00:58:51 +00:00
2024-06-26 22:04:34 +00:00
%if %{with docs}
2019-03-07 00:58:51 +00:00
%package -n python-%{srcname}-doc
Summary: dask documentation
BuildArch: noarch
2021-01-19 07:33:52 +00:00
BuildRequires: python3dist(dask_sphinx_theme) >= 1.3.5
2019-03-07 00:58:51 +00:00
BuildRequires: python3dist(numpydoc)
2021-08-21 20:10:35 +00:00
BuildRequires: python3dist(sphinx) >= 4
2019-03-07 00:58:51 +00:00
%description -n python-%{srcname}-doc
2021-06-17 10:24:36 +00:00
Documentation for dask.
2019-03-07 00:58:51 +00:00
%endif
%prep
%autosetup -n %{srcname}-%{version} -p1
2019-03-07 00:58:51 +00:00
2021-08-21 20:10:35 +00:00
%generate_buildrequires
%pyproject_buildrequires -x test,array,bag,dataframe,delayed
2021-08-21 20:10:35 +00:00
%if %{without bootstrap}
%pyproject_buildrequires -x distributed
%endif
2019-03-07 00:58:51 +00:00
%build
2021-08-21 20:10:35 +00:00
%pyproject_wheel
2019-03-07 00:58:51 +00:00
2024-06-26 22:04:34 +00:00
%if %{with docs}
2019-03-07 00:58:51 +00:00
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%install
2021-08-21 20:10:35 +00:00
%pyproject_install
%pyproject_save_files -l %{srcname}
2019-03-07 00:58:51 +00:00
%check
# This test compares against files in .github/. It does not work on the PyPI
# sdist, and is only relevant to upstream CI anyway.
#
# test_development_guidelines_matches_ci fails from sdist
# https://github.com/dask/dask/issues/8499
k="${k-}${k+ and }not test_development_guidelines_matches_ci"
2021-06-17 10:24:36 +00:00
pytest_args=(
-m 'not network'
-n "auto"
-k "${k-}"
2023-01-22 05:57:56 +00:00
# arrow tests all fail on s390x, it's not at all BE-safe
# the exclusion of arrow as a build dep on s390x above is meant to
# ensure these tests get skipped, but dask-expr requires arrow, so it
# it gets pulled into the build env anyway
# https://github.com/dask/dask/issues/11186
%ifarch s390x
--ignore %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/test_parquet.py
%endif
# Upstream uses 'thread' for Windows, but that kills the whole session, and
# we'd like to see exactly which tests fail.
--timeout_method=signal
%ifarch riscv64
--timeout=3000
%endif
--pyargs dask
)
cd docs
%{pytest} "${pytest_args[@]}"
2019-03-07 00:58:51 +00:00
2021-08-21 20:10:35 +00:00
%files -n python3-%{srcname} -f %{pyproject_files}
2019-03-07 00:58:51 +00:00
%doc README.rst
%license dask/array/NUMPY_LICENSE.txt
2022-10-16 23:30:04 +00:00
%{_bindir}/dask
2024-06-26 22:04:34 +00:00
%if %{with docs}
2019-03-07 00:58:51 +00:00
%files -n python-%{srcname}-doc
%doc html
%license dask/array/NUMPY_LICENSE.txt
2019-03-07 00:58:51 +00:00
%endif
%changelog
2021-07-31 07:34:37 +00:00
%autochangelog