%global pypi_name dandischema # Fedora's python-dandischema stops at 0.10.3 and is orphaned (2026-10-12: no main admin, # commit access only for neuro-sig and python-packagers-sig, and no spec on rawhide). dandi # 0.81 needs >= 0.12, != 0.13.0, < 0.15, so the Copr carries 0.14.0, which supersedes # Fedora's build. Name: python-%{pypi_name} Version: 0.14.0 Release: 2%{?dist} Summary: Python library for maintaining and managing DANDI metadata schemata License: Apache-2.0 URL: https://github.com/dandi/dandi-schema Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: Every Dandiset and associated asset has a metadata object that can be retrieved using the DANDI API. This library helps create and validate DANDI schema-compliant metadata for Dandisets and assets.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{_description} %prep %autosetup -p1 -n %{pypi_name}-%{version} %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} %check %pyproject_check_import -e '%{pypi_name}.tests*' -e '%{pypi_name}.*.tests*' -e '%{pypi_name}.pytest_plugin' # The pydantic models build and produce the JSON schema dandi validates against, # offline (schema generation needs no network). %{py3_test_envvars} %{python3} - <<'EOF' from dandischema.models import Dandiset, Asset from dandischema.consts import DANDI_SCHEMA_VERSION s = Dandiset.model_json_schema() assert 'properties' in s and 'contributor' in s['properties'], sorted(s)[:10] a = Asset.model_json_schema() assert 'properties' in a print('schema', DANDI_SCHEMA_VERSION, len(s['properties']), 'Dandiset fields') EOF %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.md %changelog * Mon Oct 12 2026 Morgan Hough - 0.14.0-2 - Import check skips dandischema.pytest_plugin, which needs pytest. * Mon Oct 12 2026 Morgan Hough - 0.14.0-1 - 0.14.0 for dandi 0.81, which needs >= 0.12. Fedora's package stops at 0.10.3 and is orphaned. Built from the PyPI sdist; %%check builds the JSON schemas offline.