%global srcname pydantic-numpy %global pypiname pydantic_numpy Name: python-%{srcname} Version: 9.1.0 Release: 1%{?dist} Summary: Numpy array types and validation for pydantic models License: BSD-3-Clause URL: https://github.com/caniko/pydantic-numpy # The GitHub tag, not the sdist: the sdist leaves out the tests (it does ship # LICENSE, which 9.0.2's did not). Source: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # Upstream builds with uv_build (see %%prep). BuildRequires: python3-uv-build # %%check BuildRequires: python3-pytest BuildRequires: python3-jsonschema %global _description %{expand: pydantic-numpy adds numpy array annotations to pydantic models: arrays with a checked dtype, dimensionality and shape, serialisation of models holding arrays to and from npy/npz and YAML files, and JSON schema generation. It is what mkstd uses to describe array-valued fields in a data standard.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Two requirements track upstream's lock file rather than an API. # uv_build>=0.8.14,<0.9.0: the cap is the uv release current when 9.1.0 was # cut; Fedora ships uv_build 0.12.x, and the wheel builds with it unchanged. # ruamel-yaml~=0.18.5: excludes Fedora's 0.19.1. The suite below is the # evidence that 0.19.1 works. grep -q '"uv_build>=0.8.14,<0.9.0"' pyproject.toml || { echo "uv_build pin not found" >&2; exit 1; } sed -i 's/"uv_build>=0.8.14,<0.9.0"/"uv_build"/' pyproject.toml grep -q '"ruamel-yaml~=0.18.5"' pyproject.toml || { echo "ruamel-yaml pin not found" >&2; exit 1; } sed -i 's/"ruamel-yaml~=0.18.5"/"ruamel-yaml>=0.18.5"/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypiname} %check %pytest -q tests %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog * Fri Oct 23 2026 Morgan Hough - 9.1.0-1 - Initial package: pydantic_numpy 9.1.0 (BSD-3-Clause, per LICENSE). Net-new to Fedora; required by mkstd. The candidates list had 9.0.2, which pinned semver and ruamel-yaml==0.18; 9.1.0 (2026-10-18) drops semver and pins ruamel-yaml~=0.18.5. - Relax two pins: uv_build<0.9 and ruamel-yaml<0.19. With uv_build 0.12.24 the wheel builds, and with ruamel.yaml 0.19.1 (Fedora 44) the upstream suite gives 586 passed, 0 failed, offline. Needs compress-pickle[lz4].