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.
|
2019-07-23 05:48:25 +00:00
|
|
|
%bcond_without bootstrap
|
2019-03-07 00:58:51 +00:00
|
|
|
|
2022-05-17 14:39:38 +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-06-17 23:16:42 +00:00
|
|
|
Version: 2024.6.0
|
|
|
|
%global tag 2024.6.0
|
2021-07-31 07:34:37 +00:00
|
|
|
Release: %autorelease
|
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
|
2022-05-09 12:42:18 +00:00
|
|
|
Source0: %{pypi_source %{srcname}}
|
2023-05-08 03:22:38 +00:00
|
|
|
# Fedora-specific patch.
|
|
|
|
Patch: 0002-Skip-coverage-testing.patch
|
2024-03-01 01:31:56 +00:00
|
|
|
Patch: 0006-Allow-older-versioneer.patch
|
2024-06-17 23:16:42 +00:00
|
|
|
# https://github.com/dask/dask/pull/11185
|
|
|
|
# Fix issues on Python 3.13
|
|
|
|
Patch: 0001-Handle-Python-3.13-exception-type-change-in-unpack_c.patch
|
|
|
|
Patch: 0002-test_derived_from-don-t-expect-extra-docstring-to-be.patch
|
2019-03-07 00:58:51 +00:00
|
|
|
|
2024-03-11 12:41:59 +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}
|
|
|
|
|
2022-05-17 14:39:38 +00:00
|
|
|
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.
|
2022-05-17 14:39:38 +00:00
|
|
|
# Fastavro does not support 32 bit architectures and is ExcludeArch:
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1943932
|
|
|
|
%ifnarch %{arm32} %{ix86}
|
2019-09-14 07:48:43 +00:00
|
|
|
BuildRequires: python3dist(fastavro)
|
2022-05-17 14:39:38 +00:00
|
|
|
%endif
|
2019-09-14 07:48:43 +00:00
|
|
|
BuildRequires: python3dist(h5py)
|
|
|
|
BuildRequires: python3dist(psutil)
|
2022-12-19 01:53:35 +00:00
|
|
|
# libarrow does not support 32 bit architectures and is ExcludeArch.
|
|
|
|
# Tests don't pass on s390x either.
|
|
|
|
%ifnarch %{arm} %{ix86} s390x
|
2022-12-19 00:59:31 +00:00
|
|
|
BuildRequires: python3dist(pyarrow)
|
|
|
|
%endif
|
2019-09-14 07:48:43 +00:00
|
|
|
BuildRequires: python3dist(requests)
|
|
|
|
BuildRequires: python3dist(sqlalchemy)
|
2023-08-20 00:26:17 +00:00
|
|
|
# tables does not support 32 bit architectures and is ExcludeArch.
|
|
|
|
%ifnarch %{ix86}
|
2022-12-19 00:59:31 +00:00
|
|
|
BuildRequires: python3dist(tables)
|
2023-08-20 00:26:17 +00:00
|
|
|
%endif
|
2019-09-14 07:48:43 +00:00
|
|
|
BuildRequires: python3dist(zarr)
|
2019-03-07 00:58:51 +00:00
|
|
|
|
2019-03-07 01:38:30 +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}
|
2019-03-07 01:38:30 +00:00
|
|
|
Recommends: python3-%{srcname}+distributed = %{version}-%{release}
|
2019-11-13 03:04:07 +00:00
|
|
|
%endif
|
2022-05-09 12:42:18 +00:00
|
|
|
# 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.
|
2022-05-09 12:42:18 +00:00
|
|
|
#
|
|
|
|
# - 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)
|
2019-03-07 01:38:30 +00:00
|
|
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
Dask is a flexible parallel computing library for analytics.
|
|
|
|
|
|
|
|
|
2022-05-09 12:42:18 +00:00
|
|
|
%pyproject_extras_subpkg -n python3-%{srcname} array bag dataframe delayed
|
2019-11-13 03:04:07 +00:00
|
|
|
%if %{without bootstrap}
|
2021-08-21 20:10:35 +00:00
|
|
|
%pyproject_extras_subpkg distributed
|
2019-11-13 03:04:07 +00:00
|
|
|
%endif
|
2019-03-07 00:58:51 +00:00
|
|
|
|
|
|
|
|
2019-07-23 06:43:50 +00:00
|
|
|
%if %{without bootstrap}
|
2019-03-07 00:58:51 +00:00
|
|
|
%package -n python-%{srcname}-doc
|
|
|
|
Summary: dask documentation
|
|
|
|
|
2022-05-17 14:39:38 +00:00
|
|
|
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
|
2022-05-09 12:42:18 +00:00
|
|
|
%autosetup -n %{srcname}-%{version} -p1
|
2022-06-21 10:03:36 +00:00
|
|
|
# we don't use pre-commit when running tests
|
|
|
|
sed -i '/"pre-commit"/d' setup.py
|
2019-03-07 00:58:51 +00:00
|
|
|
|
2021-08-21 20:10:35 +00:00
|
|
|
|
|
|
|
%generate_buildrequires
|
2022-05-09 12:42:18 +00:00
|
|
|
%pyproject_buildrequires -r -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
|
|
|
|
2019-07-23 06:43:50 +00:00
|
|
|
%if %{without bootstrap}
|
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 %{srcname}
|
2019-03-07 00:58:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
%check
|
2021-06-17 10:24:36 +00:00
|
|
|
%ifarch arm
|
|
|
|
# Is there a way to do this in one line?
|
|
|
|
%global have_arm 1
|
2019-09-14 07:48:43 +00:00
|
|
|
%endif
|
2019-03-07 00:58:51 +00:00
|
|
|
|
2022-05-24 12:19:47 +00:00
|
|
|
%if 0%{?__isa_bits} == 32
|
2022-05-09 12:42:18 +00:00
|
|
|
# read_sql_query with meta converts dtypes from 32 to 64.
|
|
|
|
# https://github.com/dask/dask/issues/8620
|
|
|
|
|
|
|
|
# > tm.assert_frame_equal(
|
|
|
|
# a, b, check_names=check_names, check_dtype=check_dtype, **kwargs
|
|
|
|
# E AssertionError: Attributes of DataFrame.iloc[:, 1] (column name="age") are different
|
|
|
|
# E
|
|
|
|
# E Attribute "dtype" are different
|
|
|
|
# E [left]: int32
|
|
|
|
# E [right]: int64
|
|
|
|
# dask/dataframe/utils.py:555: AssertionError
|
|
|
|
k="${k-}${k+ and }not test_query_with_meta"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
# TODO: Should this be reported upstream? Is it a dask issue, or a numpy one?
|
|
|
|
# Possibly related to
|
|
|
|
# https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition?
|
|
|
|
|
|
|
|
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
|
|
|
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
|
|
|
# E assert False
|
|
|
|
# E + where False = allclose(array([0.12586355-0.09957204j, 0.20256483+0.04098342j,\n 0.05781123-0.03588671j, 0.01135963-0.03334219j,\n 0.03747771+0.07495994j, 0.2106574 -0.0363521j ,\n 0.16352091+0.03782915j, 0.1381678 -0.06815128j,\n 0.03781295-0.04011523j, 0.01493269+0.07780643j]), array([0.12559072-0.07164038j, 0.20256483+0.05438578j,\n 0.05781123-0.03588671j, 0.01135963-0.03334219j,\n 0.03747771+0.07495994j, 0.2106574 -0.0363521j ,\n 0.16352091+0.03782915j, 0.1381678 -0.06815128j,\n 0.03781295-0.04011523j, 0.01493269+0.07780643j]), equal_nan=True, **{})
|
|
|
|
# dask/array/utils.py:361: AssertionError
|
|
|
|
k="${k-}${k+ and }not test_lstsq[100-10-10-True]"
|
|
|
|
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
|
|
|
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
|
|
|
# E assert False
|
|
|
|
# E + where False = allclose(array([ 0.20168675+0.08857556j, 0.144233 -0.19173091j,\n -0.03367557-0.08053959j, 0.04108325-0.24648308j,\n -0.01844576+0.00841932j, 0.29652375+0.05682199j,\n 0.05551828+0.20156798j, -0.08409592+0.02354949j,\n 0.09848743-0.00748637j, 0.22889193-0.07372773j]), array([ 0.20067551+0.2642591j , 0.144233 -0.18573336j,\n -0.03367557-0.08053959j, 0.04108325-0.24648308j,\n -0.01844576+0.00841932j, 0.29652375+0.05682199j,\n 0.05551828+0.20156798j, -0.08409592+0.02354949j,\n 0.09848743-0.00748637j, 0.22889193-0.07372773j]), equal_nan=True, **{})
|
|
|
|
# dask/array/utils.py:361: AssertionError
|
|
|
|
k="${k-}${k+ and }not test_lstsq[20-10-5-True]"
|
|
|
|
|
|
|
|
# test_vdot fails with NumPy 1.19.0
|
|
|
|
# https://github.com/dask/dask/issues/6406
|
|
|
|
#
|
|
|
|
# vdot returns incorrect results on ppc64le
|
|
|
|
# https://github.com/numpy/numpy/issues/17087
|
|
|
|
|
|
|
|
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
|
|
|
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
|
|
|
# E assert False
|
|
|
|
# E + where False = allclose((0.38772781971416226-0.6851997484294434j), (0.38772781971416226-0.306563166009585j), equal_nan=True, **{})
|
|
|
|
# dask/array/utils.py:361: AssertionError
|
|
|
|
k="${k-}${k+ and }not test_vdot[shape0-chunks0]"
|
|
|
|
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
|
|
|
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
|
|
|
# E assert False
|
|
|
|
# E + where False = allclose((0.38772781971416226-0.6851997484294434j), (0.38772781971416226-0.306563166009585j), equal_nan=True, **{})
|
|
|
|
# dask/array/utils.py:361: AssertionError
|
|
|
|
k="${k-}${k+ and }not test_vdot[shape1-chunks1]"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2023-07-19 10:00:30 +00:00
|
|
|
# This test shows excess memory usage on Python 3.12
|
|
|
|
# https://github.com/dask/dask/issues/10418
|
|
|
|
k="${k-}${k+ and }not test_division_or_partition"
|
|
|
|
|
2021-06-17 10:24:36 +00:00
|
|
|
pytest_args=(
|
|
|
|
-m 'not network'
|
|
|
|
|
|
|
|
-n %[0%{?have_arm}?"2":"auto"]
|
2022-01-16 00:20:12 +00:00
|
|
|
|
2023-03-28 08:37:06 +00:00
|
|
|
%ifarch %{ix86}
|
|
|
|
# Ignore 32-bit warning
|
|
|
|
-W 'ignore:invalid value encountered in cast:RuntimeWarning'
|
|
|
|
%endif
|
2022-05-17 14:39:38 +00:00
|
|
|
|
|
|
|
-k "${k-}"
|
2023-01-22 05:57:56 +00:00
|
|
|
|
|
|
|
--pyargs dask
|
2021-06-17 10:24:36 +00:00
|
|
|
)
|
|
|
|
|
2024-06-18 02:54:29 +00:00
|
|
|
%ifarch s390x
|
|
|
|
# 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
|
|
|
|
# this is hideous because the tests are part of the library, it would
|
|
|
|
# be much less ugly if the tests were separate like in any sane project
|
|
|
|
mv %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/test_parquet.py %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/XXparquetXX
|
|
|
|
%endif
|
|
|
|
|
2023-01-22 05:57:56 +00:00
|
|
|
cd docs
|
2024-06-18 02:54:29 +00:00
|
|
|
%{pytest} "${pytest_args[@]}" -k "test_derived_from"
|
|
|
|
|
|
|
|
%ifarch s390x
|
|
|
|
mv %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/XXparquetXX %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/test_parquet.py
|
|
|
|
%endif
|
|
|
|
|
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
|
2022-05-09 12:42:18 +00:00
|
|
|
%license LICENSE.txt dask/array/NUMPY_LICENSE.txt
|
2022-10-16 23:30:04 +00:00
|
|
|
%{_bindir}/dask
|
2019-03-07 01:38:30 +00:00
|
|
|
|
2019-07-23 06:43:50 +00:00
|
|
|
%if %{without bootstrap}
|
2019-03-07 00:58:51 +00:00
|
|
|
%files -n python-%{srcname}-doc
|
|
|
|
%doc html
|
2022-05-09 12:42:18 +00:00
|
|
|
%license LICENSE.txt dask/array/NUMPY_LICENSE.txt
|
2019-03-07 00:58:51 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-07-31 07:34:37 +00:00
|
|
|
%autochangelog
|