%global pypi_name datalad-gooey Name: python-%{pypi_name} Version: 0.2.0 Release: 1%{?dist} Summary: Graphical user interface for DataLad License: MIT URL: https://github.com/datalad/datalad-gooey Source0: %{pypi_source datalad_gooey} 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-gooey is a Qt (PySide6) graphical interface for DataLad: browse a dataset, see file states and run DataLad commands from forms. Start it with datalad gooey. 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_gooey-%{version} # Fedora rejects ambiguous #!/usr/bin/env python shebangs in installed modules. find . -name '*.py' -exec sed -i '1s|^#!/usr/bin/env python$|#!%{python3}|' {} + # Old _datalad_buildsupport imports DistutilsOptionError from setuptools, which current # setuptools no longer re-exports; setuptools.errors.OptionError is the same class. if [ -f _datalad_buildsupport/setup.py ] && grep -q 'from setuptools import Command, DistutilsOptionError' _datalad_buildsupport/setup.py; then sed -i 's/^from setuptools import Command, DistutilsOptionError$/from setuptools import Command\nfrom setuptools.errors import OptionError as DistutilsOptionError/' _datalad_buildsupport/setup.py grep -q '^from setuptools.errors import OptionError as DistutilsOptionError$' _datalad_buildsupport/setup.py fi %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_gooey %check export HOME=$PWD git config --global user.name mockbuild && git config --global user.email mockbuild@localhost %pyproject_check_import -e 'datalad_gooey.tests*' -e 'datalad_gooey.*.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_gooey')] assert eps, 'no datalad.extensions entry point for datalad_gooey' for e in eps: suite = e.load() print(e.name, '->', suite[0] if isinstance(suite, tuple) else suite) EOF %{py3_test_envvars} %{buildroot}%{_bindir}/datalad-gooey-askpass --help > /dev/null %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %{_bindir}/datalad-gooey-askpass %changelog * Mon Oct 12 2026 Morgan Hough - 0.2.0-1 - Initial package, for the DataLad extension stack and dandi.