15
0

Accepting request 989516 from home:VortexAcherontic

Added the requested changes:

- formatted spec file using spec-cleaner
- removed macros from name and url
-  added test runs
- and improved the multi version support

Many thanks for looking into it :)

OBS-URL: https://build.opensuse.org/request/show/989516
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-icoextract?expand=0&rev=1
This commit is contained in:
2022-07-16 10:57:26 +00:00
committed by Git OBS Bridge
commit ab3abe4be9
5 changed files with 193 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
icoextract-0.1.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca2450e716b6c65cf695c1b480e5503b8103b10ed8de5110eac0778fbc502117
size 46447

65
python-icoextract.changes Normal file
View File

@@ -0,0 +1,65 @@
-------------------------------------------------------------------
Sat Jul 16 05:20:53 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Clean spec file
-------------------------------------------------------------------
Sat Jul 16 05:18:36 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Fixed multi version support for exe-thumbnailer.thumbnailer
-------------------------------------------------------------------
Sat Jul 16 04:29:14 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Added %check for provided test files
-------------------------------------------------------------------
Fri Jul 15 21:07:48 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Removed %global module_name icoextract
- Ran spec-cleaner
-------------------------------------------------------------------
Fri Jul 15 20:22:50 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Added pefile to runtime requirements
-------------------------------------------------------------------
Fri Jul 15 20:11:44 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Removed min required python-devel version
-------------------------------------------------------------------
Fri Jul 15 20:10:02 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Proper python sitelib support
-------------------------------------------------------------------
Thu Jul 14 11:46:05 UTC 2022 - Imo Hester <vortex@z-ray.de>
- Update to version 0.1.3
* setup.py: exclude tests from installed packages
* More verbose install notes
* CI: run tests on bullseye
* More tests for thumbnailers on various sizes
* tests: cleanup Makefile
* thumbnailer: use native 128x128 icons when available
* Update supported Python versions
* Move version check and metadata fields to setup.cfg
* README: probably better to install icoextract[thumbnailer]
* Add changelog
-------------------------------------------------------------------
Sun Oct 17 02:00:15 UTC 2021 - Antônio Vinícius Menezes Medeiros <linuxkamarada@gmail.com> - 0.1.2
- Update to v0.1.2
-------------------------------------------------------------------
Sun Jul 5 01:45:00 UTC 2020 - Antônio Vinícius Menezes Medeiros <linuxkamarada@gmail.com> - 0.1.1
- Update to v0.1.1
-------------------------------------------------------------------
Tue Feb 4 19:30:00 UTC 2020 - Antônio Vinícius Menezes Medeiros <linuxkamarada@gmail.com> - 0.1.0
- First icoextract package

101
python-icoextract.spec Normal file
View File

@@ -0,0 +1,101 @@
#
# spec file for package python-icoextract
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-icoextract
Version: 0.1.3
Release: 0
Summary: Extract icons from Windows PE files (.exe/.dll)
License: MIT
Group: System/GUI/Other
URL: https://github.com/jlu5/icoextract
Source: https://github.com/jlu5/icoextract/archive/%{version}/icoextract-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pefile}
BuildRequires: %{python_module setuptools}
BuildRequires: ImageMagick
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: mingw32-cross-binutils
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw64-cross-gcc
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
Requires: %{python_module pefile}
Requires(post): update-alternatives
Requires(postun): update-alternatives
Suggests: %{python_module Pillow}
BuildArch: noarch
%python_subpackages
%description
icoextract is an icon extractor for Windows PE files (.exe/.dll), written in
Python. It also includes a thumbnailer script (exe-thumbnailer) for Linux
desktops.
%prep
%setup -q -n icoextract-%{version}
%build
%python_build
%install
%python_install
mkdir -p %{buildroot}%{_datadir}/thumbnailers/
cp exe-thumbnailer.thumbnailer %{buildroot}%{_datadir}/thumbnailers/
%python_clone -a %{buildroot}%{_bindir}/exe-thumbnailer
%python_clone -a %{buildroot}%{_bindir}/icoextract
%python_clone -a %{buildroot}%{_bindir}/icolist
%python_clone -a %{buildroot}%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%if %{with test}
cd tests
%cmake_build
%endif
%post
update-alternatives --install \
%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer \
exe-thumbnailer.thumbnailer \
%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer-%{python_version} %{python_version_nodots}
%python_install_alternative exe-thumbnailer
%python_install_alternative icoextract
%python_install_alternative icolist
%postun
[ -f %{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer-%{python_version} ] || update-alternatives --remove \
exe-thumbnailer.thumbnailer \
%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer-%{python_version}
%python_uninstall_alternative exe-thumbnailer
%python_uninstall_alternative icoextract
%python_uninstall_alternative icolist
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%python_alternative %{_bindir}/exe-thumbnailer
%python_alternative %{_bindir}/icoextract
%python_alternative %{_bindir}/icolist
%dir %{_datadir}/thumbnailers
%python_alternative %{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer
%changelog