%global pypi_name datalad-metalad Name: python-%{pypi_name} Version: 0.4.22 Release: 1%{?dist} Summary: DataLad extension for semantic metadata handling License: MIT URL: https://github.com/datalad/datalad-metalad Source0: %{pypi_source datalad_metalad} BuildArch: noarch BuildRequires: python3-devel # DataLad imports and its extension entry points need git and git-annex at import time BuildRequires: git-core BuildRequires: git-annex %global _description %{expand: datalad-metalad extracts, aggregates, stores and queries metadata about datasets and files (meta-extract, meta-add, meta-dump, meta-conduct), in DataLad's versioned metadata model. It is a DataLad extension: installing it adds commands and functionality to the datalad command and Python API.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{_description} %prep %autosetup -p1 -n datalad_metalad-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # Build helpers some DataLad-template projects install at top level; not part of the package. rm -rf %{buildroot}%{python3_sitelib}/_datalad_buildsupport %{buildroot}%{python3_sitelib}/tools %{buildroot}%{python3_sitelib}/benchmarks %{buildroot}%{python3_sitelib}/tests %{buildroot}%{python3_sitelib}/tests.py # Old setup.py data_files can drop these at the top of site-packages (osfclient does). rm -f %{buildroot}%{python3_sitelib}/{LICENSE,VERSION,requirements.txt} %pyproject_save_files -L datalad_metalad %check export HOME=$PWD git config --global user.name mockbuild && git config --global user.email mockbuild@localhost %pyproject_check_import -e 'datalad_metalad.tests*' -e 'datalad_metalad.*.tests*' -e '*.test_*' -e '*.conftest' -e '*.pytest_plugin' -e '*.resources.procedures.*' # The extension registers with DataLad: its command suite loads through datalad's API. %{py3_test_envvars} %{python3} - <<'EOF' from importlib.metadata import entry_points eps = [e for e in entry_points(group='datalad.extensions') if e.value.startswith('datalad_metalad')] assert eps, 'no datalad.extensions entry point for datalad_metalad' for e in eps: suite = e.load() print(e.name, '->', suite[0] if isinstance(suite, tuple) else suite) EOF %files -n python3-%{pypi_name} -f %{pyproject_files} %license COPYING %changelog * Mon Oct 12 2026 Morgan Hough - 0.4.22-1 - Initial package, for the DataLad extension stack and dandi.