%global python3_pkgversion 3.11 Name: python-zombie-imp Version: 0.0.2 Release: 6.c%{?dist} Summary: A copy of the `imp` module that was removed in Python 3.12 License: Python-2.0.1 URL: https://github.com/encukou/zombie-imp Source: %{pypi_source zombie-imp} # Make the tests pass with Python 3.13.0a1+, 3.12.1+, 3.11.6+ Patch: https://github.com/encukou/zombie-imp/commit/d45295faf4.patch BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-test %global _description %{expand: A copy of the imp module that was removed in Python 3.12. This is a compat package to ease transition to Python 3.12. It shouldn't be used and packages using `imp` module should use `importlib.metadata` instead.} %description %_description %package -n python%{python3_pkgversion}-zombie-imp Summary: %{summary} # This package is deprecated, no new packages in Fedora can depend on it Provides: deprecated() %description -n python%{python3_pkgversion}-zombie-imp %_description %prep %autosetup -p1 -n zombie-imp-%{version} %generate_buildrequires %pyproject_buildrequires -t %build %pyproject_wheel %install %pyproject_install %pyproject_save_files zombie_imp imp %check for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1%{python3_pkgversion}.mo/"<<<"$m"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1%{python3_pkgversion}.\2/"<<<"$m"); done for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)$/\1%{python3_pkgversion}/"<<<"$b"); done %tox %files -n python%{python3_pkgversion}-zombie-imp -f %{pyproject_files} %doc README.* %changelog * Tue Mar 26 2024 Ding-Yi Chen - 0.0.2-6.c - Cut corner packaging * Fri Jan 26 2024 Fedora Release Engineering - 0.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Oct 24 2023 Miro Hrončok - 0.0.2-3 - Make the tests pass with Python 3.13.0a1+, 3.12.1+, 3.11.6+ * Fri Jul 21 2023 Fedora Release Engineering - 0.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 27 2023 Tomáš Hrnčiar - 0.0.2-1 - Initial package