%global pypi_name numpydantic Name: python-%{pypi_name} Version: 2.0.0 Release: 1%{?dist} Summary: Type and shape validation and serialisation for arrays in pydantic models License: MIT URL: https://github.com/p2p-ld/numpydantic Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros BuildRequires: python3-pytest BuildRequires: python3-h5py BuildRequires: python3-dask %global _description %{expand: numpydantic adds NDArray annotations to pydantic models: arrays are validated for dtype and shape, and serialised to JSON. NumPy, HDF5 (h5py), Dask, Zarr and video arrays share one interface. pyRadPlan uses it for its CT, dose and machine data models.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} Suggests: python3-h5py Suggests: python3-dask %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 Fedora lacks or ships too old (opencv-python video, zarr >= 3) # are excluded from the import check; their interface tests skip. %pyproject_check_import -e 'numpydantic.interface.video*' -e 'numpydantic.interface.zarr*' -e 'numpydantic.testing.*' %pytest -p no:cacheprovider tests -o addopts="-ra" %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Fri Nov 06 2026 Morgan Hough - 2.0.0-1 - Initial package; dependency of pyRadPlan.