%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 # numpydantic.mypy is a mypy plugin; with mypy present it is import-checked and tested too. BuildRequires: python3-mypy %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 are left out: video needs # opencv-python, zarr needs >= 3.1 (Fedora has 2.18), and the pyright test needs pyright. %pyproject_check_import -e 'numpydantic.interface.video*' -e 'numpydantic.interface.zarr*' -e 'numpydantic.testing.*' %pytest -p no:cacheprovider tests -o addopts="-ra" \ --ignore=tests/test_pyright.py --ignore=tests/test_interface/test_video.py \ --ignore=tests/test_interface/test_zarr.py %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.