# A noarch package, but optional dependency on pytorch which # is only available on x86_64 and aarch64 requires architecture # dependent packages # mpi4py is not available on ix86 %global debug_package %{nil} Name: python-pymor Version: 2024.2.0 Release: %autorelease Summary: Python model order reduction library # Main code is BSD-2-Clause, some solver contributions # are under BSD-3-Clause License: BSD-2-Clause AND BSD-3-Clause URL: https://pymor.org Source: %{pypi_source pymor} BuildRequires: python3-devel %ifnarch %{ix86} BuildRequires: python3-mpi4py-mpich %endif %ifarch %{x86_64} || %{aarch64} BuildRequires: python3-torch %endif %global _description %{expand: pyMOR is a software library for building model order reduction applications with the Python programming language. All algorithms in pyMOR are formulated in terms of abstract interfaces, allowing generic implementations to work with different backends, from NumPy/SciPy to external partial differential equation solver packages.} %description %_description %package -n python3-pymor Summary: %{summary} %description -n python3-pymor %_description %ifarch %{x86_64} || %{aarch64} %pyproject_extras_subpkg -n python3-pymor ann,gmsh,gui,ipyparallel,mpi %elifarch %{ix86} %pyproject_extras_subpkg -n python3-pymor gui,ipyparallel %else %pyproject_extras_subpkg -n python3-pymor gmsh,gui,ipyparallel,mpi %endif %prep %autosetup -p1 -n pymor-%{version} # Dependency resolution fails for this sed -i '/"mpi4py>=3.0.3",/d' pyproject.toml %generate_buildrequires %ifarch %{x86_64} || %{aarch64} %pyproject_buildrequires -x ann,gmsh,gui,ipyparallel,mpi %elifarch %{ix86} %pyproject_buildrequires -x gui,ipyparallel %else %pyproject_buildrequires -x gmsh,gui,ipyparallel,mpi %endif %build %pyproject_wheel %install %pyproject_install # Add top-level Python module names here as arguments, you can use globs %pyproject_save_files -l 'pymor*' %check %pyproject_check_import -t # Tests need pytest_notebook which is not yet in Fedora %files -n python3-pymor -f %{pyproject_files} %doc README.md %doc AUTHORS.md %{_bindir}/pymor-demo %{_bindir}/pymor-vis %changelog %autochangelog