## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name icoextract %global pypi_version 0.2.0 # NOTE: 'icoextract' itself required for tests %bcond_with tests Name: python-%{pypi_name} Version: %{pypi_version} Release: %autorelease Summary: Extract icons from Windows PE files (.exe/.dll) License: MIT URL: https://github.com/jlu5/icoextract # Tests not available on PyPI Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel %if %{with tests} BuildRequires: ImageMagick BuildRequires: make BuildRequires: mingw32-gcc BuildRequires: mingw64-gcc BuildRequires: python3-icoextract %endif %global _description %{expand: icoextract is an icon extractor for Windows PE files (.exe/.dll/.mun), written in Python. It also includes a thumbnailer script (exe-thumbnailer) for Linux desktops. This project is inspired by extract-icon-py, icoutils, and others. icoextract aims to be: * Lightweight * Portable (cross-platform) * Fast on large files} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(pefile) Requires: python3dist(pillow) Requires: python3dist(setuptools) %description -n python3-%{pypi_name} %{_description} %prep %autosetup -n %{pypi_name}-%{pypi_version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{pypi_name} # https://bugzilla.redhat.com/show_bug.cgi?id=2353972 install -D -p -m 0644 exe-thumbnailer.thumbnailer %{buildroot}%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer # Exec permission pushd %{buildroot}%{python3_sitelib}/%{pypi_name} chmod a+x __init__.py popd pushd %{buildroot}%{python3_sitelib}/%{pypi_name}/scripts chmod a+x {extract,icolist,thumbnailer}.py popd %if %{with tests} %check pushd tests make %{python3} test_extract.py %{python3} test_thumbnailer.py popd %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/%{pypi_name} %{_bindir}/exe-thumbnailer %{_bindir}/icolist %{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer %changelog ## START: Generated by rpmautospec * Tue Jan 20 2026 Artem Polishchuk - 0.2.0-2 - Add Packit config * Mon Jan 19 2026 Artem Polishchuk - 0.2.0-1 - 0.2.0 * Mon Jan 19 2026 Artem Polishchuk - 0.1.6-2 - Install exe-thumbnailer * Mon Jan 19 2026 Artem Polishchuk - 0.1.6-1 - 0.1.6 - Port on new Python packaging paradigm * Sat Jan 17 2026 Fedora Release Engineering - 0.1.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild * Fri Sep 19 2025 Python Maint - 0.1.5-5 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 0.1.5-4 - Rebuilt for Python 3.14.0rc2 bytecode * Fri Jul 25 2025 Fedora Release Engineering - 0.1.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Mon Jun 02 2025 Python Maint - 0.1.5-2 - Rebuilt for Python 3.14 * Mon Feb 17 2025 Artem Polishchuk - 0.1.5-1 - chore: Update to 0.1.5 * Sat Jan 18 2025 Fedora Release Engineering - 0.1.4-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Fri Jul 19 2024 Fedora Release Engineering - 0.1.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 0.1.4-9 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.1.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.1.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.1.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 0.1.4-5 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 0.1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Aug 15 2022 Artem Polishchuk - 0.1.4-3 - Initial package ## END: Generated by rpmautospec