%global pypi_name datalad-container Name: python-%{pypi_name} Version: 1.2.6 Release: 1%{?dist} Summary: DataLad extension for containerized environments License: MIT URL: https://github.com/datalad/datalad-container Source0: %{pypi_source datalad_container} 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-container adds containers-add, containers-list and containers-run: register Singularity, Apptainer or Docker images in a dataset and run commands in them with full provenance (inputs, outputs, image) recorded. 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_container-%{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_container %check export HOME=$PWD git config --global user.name mockbuild && git config --global user.email mockbuild@localhost %pyproject_check_import -e 'datalad_container.tests*' -e 'datalad_container.*.tests*' -e '*.test_*' -e '*.conftest' -e '*.pytest_plugin' # 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_container')] assert eps, 'no datalad.extensions entry point for datalad_container' 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 - 1.2.6-1 - Initial package, for the DataLad extension stack and dandi.