python-dask/python-dask.spec
David Abdurachmanov 09deadb96d
Increase timeout by 10x
[..]
FAILED ../dataframe/tests/test_arithmetics_reduction.py::test_arithmetics_different_index - Failed: Timeout >300.0s
= 1 failed, 10037 passed, 1667 skipped, 257 xfailed, 281 xpassed, 230 warnings in 5349.24s (1:29:09) =
[..]

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-08-10 06:47:46 +03:00

259 lines
7.3 KiB
RPMSpec

%global srcname dask
# Requires distributed, which is a loop.
# Also, some tests require packages that require dask itself.
# Force bootstrap for package review.
%bcond bootstrap 1
# We don't have all dependencies available yet.
%bcond docs 0
# 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}
Name: python-%{srcname}
Version: 2024.8.0
%global tag 2024.8.0
Release: %autorelease -e 0.riscv64
Summary: Parallel PyData with Task Scheduling
License: BSD-3-Clause
URL: https://github.com/dask/dask
Source0: %{pypi_source %{srcname}}
# Fedora-specific patch.
Patch: 0001-Remove-extra-test-dependencies.patch
# Stop building on i686
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
%description
Dask is a flexible parallel computing library for analytics.
%package -n python3-%{srcname}
Summary: %{summary}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(graphviz)
BuildRequires: python3dist(ipython)
%if %{without bootstrap}
BuildRequires: python3dist(scikit-image)
BuildRequires: python3dist(xarray)
%endif
# 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
BuildRequires: python3dist(requests)
BuildRequires: python3dist(sqlalchemy)
BuildRequires: python3dist(tables)
BuildRequires: python3dist(zarr)
Recommends: python3-%{srcname}+array = %{version}-%{release}
Recommends: python3-%{srcname}+bag = %{version}-%{release}
Recommends: python3-%{srcname}+dataframe = %{version}-%{release}
Recommends: python3-%{srcname}+delayed = %{version}-%{release}
%if %{without bootstrap}
Recommends: python3-%{srcname}+distributed = %{version}-%{release}
%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
# 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}
%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}
%endif
%if %{with docs}
%package -n python-%{srcname}-doc
Summary: dask documentation
BuildArch: noarch
BuildRequires: python3dist(dask_sphinx_theme) >= 1.3.5
BuildRequires: python3dist(numpydoc)
BuildRequires: python3dist(sphinx) >= 4
%description -n python-%{srcname}-doc
Documentation for dask.
%endif
%prep
%autosetup -n %{srcname}-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires -x test,array,bag,dataframe,delayed
%if %{without bootstrap}
%pyproject_buildrequires -x distributed
%endif
%build
%pyproject_wheel
%if %{with docs}
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif
%install
%pyproject_install
%pyproject_save_files -l %{srcname}
%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"
pytest_args=(
-m 'not network'
-n "auto"
-k "${k-}"
# 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[@]}"
%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.rst
%license dask/array/NUMPY_LICENSE.txt
%{_bindir}/dask
%if %{with docs}
%files -n python-%{srcname}-doc
%doc html
%license dask/array/NUMPY_LICENSE.txt
%endif
%changelog
%autochangelog