%global pypi_name ipax Name: python-%{pypi_name} Version: 0.13.0 Release: 1%{?dist} Summary: Array-API primal-dual interior-point solver for nonlinear optimisation License: Apache-2.0 URL: https://github.com/wahln/ipax Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros BuildRequires: python3-pytest BuildRequires: python3-hypothesis BuildRequires: python3-numpy BuildRequires: python3-scipy BuildRequires: python3-sympy BuildRequires: python3-array-api-strict %global _description %{expand: ipax is a primal-dual interior-point solver for large-scale nonlinear constrained optimisation, in the style of IPOPT, written against the Python array API standard so it runs on NumPy, PyTorch, CuPy or JAX arrays. pyRadPlan uses it as a pure-Python alternative to IPOPT for fluence optimisation.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} Recommends: python3-scipy %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} %check # Optional array backends: CuPy and JAX are not in Fedora, and PyTorch is not pulled in # for a solver whose NumPy path is what pyRadPlan uses. %pyproject_check_import -e 'ipax.backend.*.cupy' -e 'ipax.backend.*.torch' -e 'ipax.problem.autodiff.jax' -e 'ipax.problem.autodiff.torch' # GPU and sparse-direct adapters (cuDSS, nvmath, feral) are not in Fedora and skip; # slow benchmarks are deselected. # The suite runs on the NumPy backend (IPAX_BACKENDS). Upstream's CI pair adds # array-api-strict as a purity gate, but Fedora's 2.0.1 defaults to the 2022.12 standard and # ipax calls 2023.12 functions (maximum, minimum, clip, searchsorted, cumulative_sum): 400 # failures, all that. test_input_device_allocations needs array_api_strict.Device; the # purity-gate tests run scripts/check_purity.py, which is not in the sdist; one TROTS test # imports array-api-strict directly to check non-NumPy dispatch. export IPAX_BACKENDS=numpy %pytest -p no:cacheprovider tests -m "not slow and not gpu and not sparse" -o addopts="-ra" --ignore=tests/regression/test_input_device_allocations.py --ignore=tests/test_purity_gate.py --ignore=tests/regression/test_doctest_collection_adapters.py -k "not test_non_numpy_namespaces_get_the_plain_block" %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE NOTICE %doc README.md %changelog * Fri Nov 06 2026 Morgan Hough - 0.13.0-1 - Initial package; pyRadPlan's interior-point fluence optimiser.