%global pypi_name click-didyoumean Name: python-%{pypi_name} Version: 0.3.1 Release: 1%{?dist} Summary: Enable git-like did-you-mean feature in click License: MIT URL: https://github.com/click-contrib/click-didyoumean Source0: %{pypi_source click_didyoumean} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: click-didyoumean suggests the closest command when a click command-line program gets an unknown subcommand, like git does. Fedora has 0.3.0; dandi needs 0.3.1.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{_description} %prep %autosetup -p1 -n click_didyoumean-%{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 versioneer.py uses configparser.SafeConfigParser and readfp, both removed in Python 3.12. if [ -f versioneer.py ] && grep -q SafeConfigParser versioneer.py; then sed -i 's/SafeConfigParser/ConfigParser/g; s/\.readfp(/.read_file(/g' versioneer.py if grep -qE 'SafeConfigParser|readfp\(' versioneer.py; then exit 1; fi 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 click_didyoumean %check %pyproject_check_import -e 'click_didyoumean.tests*' -e 'click_didyoumean.*.tests*' -e '*.test_*' -e '*.conftest' -e '*.pytest_plugin' %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %changelog * Mon Oct 12 2026 Morgan Hough - 0.3.1-1 - Initial package, for the DataLad extension stack and dandi.