%global pypi_name pydra Name: python-%{pypi_name} Version: 0.25 Release: 1%{?dist} Summary: Dataflow engine for reproducible scientific pipelines License: Apache-2.0 URL: https://github.com/nipype/pydra Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-env) BuildRequires: python3dist(pytest-timeout) BuildRequires: python3dist(numpy) BuildRequires: python3dist(psutil) %global _description %{expand: Pydra is the dataflow engine of the Nipype project: Python functions and shell commands become tasks that are combined into workflows, split over inputs and combined again, cached by content hash and run serially, on a local process pool, or on SLURM, SGE or Dask. This is the 0.x line (pydra.mark.task and pydra.Submitter), which pyAFQ uses; 1.0 is still in alpha. Pydra asks the Nipype "etelemetry" service for the latest release on first use; set NO_ET=1 to stop it.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} # pydra.utils.profiler (resource auditing) imports psutil, which # pyproject.toml does not declare. Requires: python3dist(psutil) %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check export NO_ET=1 %pyproject_check_import -e '*.tests.*' -e 'pydra.conftest' cd %{_builddir} # A function task through the concurrent.futures submitter. From a file: # Python 3.14's default forkserver start method re-imports __main__ in the # workers, which a script on stdin cannot provide (and needs the __main__ # guard, as any multiprocessing script does). cat > pydra_smoke.py <<'PYEOF' import pydra, tempfile @pydra.mark.task def add(a, b): return a + b if __name__ == "__main__": t = add(a=1, b=2, cache_dir=tempfile.mkdtemp()) with pydra.Submitter(plugin="cf", n_procs=2) as sub: sub(t) assert t.result().output.out == 3 print("pydra submitter ok") PYEOF %{py3_test_envvars} %{python3} pydra_smoke.py # Upstream's decorator and utility tests (193 of 205). Deselected: # - test_typing_cast*, test_typing_implicit_cast_from_super*: generate mock # files through fileformats-extras (not packaged). # - test_bytes_repr_type1a, test_bytes_special_form1a/3a: compare hash input # strings against Python <3.14 typing reprs (3.14 prints int | float for # Union[int, float]) and fileformats <0.16 class names (Json__Zip, now # Zip[Json]). They only change cache keys, which stay consistent. # - test_collect_messages: the audit messenger's JSON-LD output needs pyld. %pytest -v -p no:cacheprovider --pyargs pydra.mark.tests pydra.utils.tests \ -k 'not (test_typing_cast or test_typing_implicit_cast_from_super or test_bytes_repr_type1a or test_bytes_special_form1a or test_bytes_special_form3a or test_collect_messages)' %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.rst %changelog * Fri Oct 16 2026 Morgan Hough - 0.25-1 - Initial package (pyAFQ dependency).