Blame python-icoextract.spec

72aabc9
# Created by pyp2rpm-3.3.8
72aabc9
%global pypi_name icoextract
72aabc9
%global pypi_version 0.1.4
72aabc9
72aabc9
# NOTE: 'icoextract' itself required for tests
72aabc9
%bcond_with tests
72aabc9
72aabc9
Name:           python-%{pypi_name}
72aabc9
Version:        %{pypi_version}
3d53fcb
Release:        9%{?dist}
72aabc9
Summary:        Windows PE EXE icon extractor
72aabc9
72aabc9
License:        MIT
72aabc9
URL:            https://github.com/jlu5/icoextract
72aabc9
# Tests not available on PyPI
72aabc9
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
72aabc9
BuildArch:      noarch
72aabc9
72aabc9
BuildRequires:  python3-devel
72aabc9
BuildRequires:  python3dist(setuptools)
72aabc9
%if %{with tests}
72aabc9
BuildRequires:  ImageMagick
72aabc9
BuildRequires:  make
72aabc9
BuildRequires:  mingw32-gcc
72aabc9
BuildRequires:  mingw64-gcc
72aabc9
BuildRequires:  python3-icoextract
72aabc9
%endif
72aabc9
72aabc9
%description
72aabc9
icoextract is an icon extractor for Windows PE files (.exe/.dll), written in
72aabc9
Python. It also includes a thumbnailer script (exe-thumbnailer) for Linux
72aabc9
desktops.
72aabc9
72aabc9
This project is inspired by extract-icon-py, icoutils, and others.
72aabc9
72aabc9
icoextract aims to be:
72aabc9
72aabc9
  * Lightweight
72aabc9
  * Portable (cross-platform)
72aabc9
  * Fast on large files
72aabc9
72aabc9
72aabc9
%package -n     python3-%{pypi_name}
72aabc9
Summary:        %{summary}
72aabc9
%{?python_provide:%python_provide python3-%{pypi_name}}
72aabc9
72aabc9
Requires:       python3dist(pefile)
72aabc9
Requires:       python3dist(pillow)
72aabc9
Requires:       python3dist(setuptools)
72aabc9
%description -n python3-%{pypi_name}
72aabc9
icoextract is an icon extractor for Windows PE files (.exe/.dll), written in
72aabc9
Python. It also includes a thumbnailer script (exe-thumbnailer) for Linux
72aabc9
desktops.
72aabc9
72aabc9
This project is inspired by extract-icon-py, icoutils, and others.
72aabc9
72aabc9
icoextract aims to be:
72aabc9
72aabc9
  * Lightweight
72aabc9
  * Portable (cross-platform)
72aabc9
  * Fast on large files
72aabc9
72aabc9
72aabc9
%prep
72aabc9
%autosetup -n %{pypi_name}-%{pypi_version}
72aabc9
72aabc9
72aabc9
%build
72aabc9
%py3_build
72aabc9
72aabc9
72aabc9
%install
72aabc9
%py3_install
72aabc9
72aabc9
# Exec permission
72aabc9
pushd %{buildroot}%{python3_sitelib}/%{pypi_name}
72aabc9
chmod a+x __init__.py
72aabc9
popd
72aabc9
72aabc9
pushd %{buildroot}%{python3_sitelib}/%{pypi_name}/scripts
72aabc9
chmod a+x {extract,icolist,thumbnailer}.py
72aabc9
popd
72aabc9
72aabc9
72aabc9
%if %{with tests}
72aabc9
%check
72aabc9
pushd tests
72aabc9
make
72aabc9
%{python3} test_extract.py
72aabc9
%{python3} test_thumbnailer.py
72aabc9
popd
72aabc9
%endif
72aabc9
72aabc9
72aabc9
%files -n python3-%{pypi_name}
72aabc9
%license LICENSE
72aabc9
%doc README.md CHANGELOG.md
72aabc9
%{_bindir}/%{pypi_name}
72aabc9
%{_bindir}/exe-thumbnailer
72aabc9
%{_bindir}/icolist
72aabc9
%{python3_sitelib}/%{pypi_name}
72aabc9
%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info
72aabc9
72aabc9
72aabc9
%changelog
3d53fcb
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.1.4-9
3d53fcb
- Rebuilt for Python 3.13
3d53fcb
49e2324
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-8
49e2324
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
49e2324
99342da
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-7
99342da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
99342da
7d17fd9
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-6
7d17fd9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
7d17fd9
2cd1049
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.1.4-5
2cd1049
- Rebuilt for Python 3.12
2cd1049
7f599b4
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.4-4
7f599b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
7f599b4
72aabc9
* Mon Aug 15 2022 Artem Polishchuk <ego.cordatus@gmail.com> - 0.1.4-3
72aabc9
- Initial package