From ab3abe4be951bd0fed5e61b16786ce9d698b74b2592a1589d2549b4fa6833e15 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 16 Jul 2022 10:57:26 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 +++++++++ .gitignore | 1 + icoextract-0.1.3.tar.gz | 3 ++ python-icoextract.changes | 65 ++++++++++++++++++++++++ python-icoextract.spec | 101 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 193 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 icoextract-0.1.3.tar.gz create mode 100644 python-icoextract.changes create mode 100644 python-icoextract.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/icoextract-0.1.3.tar.gz b/icoextract-0.1.3.tar.gz new file mode 100644 index 0000000..51ec697 --- /dev/null +++ b/icoextract-0.1.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca2450e716b6c65cf695c1b480e5503b8103b10ed8de5110eac0778fbc502117 +size 46447 diff --git a/python-icoextract.changes b/python-icoextract.changes new file mode 100644 index 0000000..d1c4815 --- /dev/null +++ b/python-icoextract.changes @@ -0,0 +1,65 @@ +------------------------------------------------------------------- +Sat Jul 16 05:20:53 UTC 2022 - Imo Hester + +- Clean spec file + +------------------------------------------------------------------- +Sat Jul 16 05:18:36 UTC 2022 - Imo Hester + +- Fixed multi version support for exe-thumbnailer.thumbnailer + +------------------------------------------------------------------- +Sat Jul 16 04:29:14 UTC 2022 - Imo Hester + +- Added %check for provided test files + +------------------------------------------------------------------- +Fri Jul 15 21:07:48 UTC 2022 - Imo Hester + +- Removed %global module_name icoextract +- Ran spec-cleaner + +------------------------------------------------------------------- +Fri Jul 15 20:22:50 UTC 2022 - Imo Hester + +- Added pefile to runtime requirements + +------------------------------------------------------------------- +Fri Jul 15 20:11:44 UTC 2022 - Imo Hester + +- Removed min required python-devel version + +------------------------------------------------------------------- +Fri Jul 15 20:10:02 UTC 2022 - Imo Hester + +- Proper python sitelib support + +------------------------------------------------------------------- +Thu Jul 14 11:46:05 UTC 2022 - Imo Hester + +- 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 - 0.1.2 + +- Update to v0.1.2 + +------------------------------------------------------------------- +Sun Jul 5 01:45:00 UTC 2020 - Antônio Vinícius Menezes Medeiros - 0.1.1 + +- Update to v0.1.1 + +------------------------------------------------------------------- +Tue Feb 4 19:30:00 UTC 2020 - Antônio Vinícius Menezes Medeiros - 0.1.0 + +- First icoextract package diff --git a/python-icoextract.spec b/python-icoextract.spec new file mode 100644 index 0000000..2d8094f --- /dev/null +++ b/python-icoextract.spec @@ -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