diff --git a/.gitignore b/.gitignore index bb80ca6..afba5a6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /vimiv-qt-0.5.0.tar.gz /vimiv-qt-0.6.1.tar.gz /vimiv-qt-0.7.0.tar.gz +/vimiv-qt-0.8.0.tar.gz +/vimiv-qt-0.9.0.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..42de40b --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,8 @@ +upstream_project_url: https://github.com/karlch/vimiv-qt +copy_upstream_release_description: false + +jobs: + - job: pull_from_upstream + trigger: release + dist_git_branches: + - fedora-all diff --git a/0001-fix-check-version.patch b/0001-fix-check-version.patch new file mode 100644 index 0000000..63d8dfe --- /dev/null +++ b/0001-fix-check-version.patch @@ -0,0 +1,12 @@ +diff -ur vimiv-qt-0.9.0.orig/vimiv/checkversion.py vimiv-qt-0.9.0/vimiv/checkversion.py +--- vimiv-qt-0.9.0.orig/vimiv/checkversion.py 2025-11-10 15:42:55.589597665 +0000 ++++ vimiv-qt-0.9.0/vimiv/checkversion.py 2025-11-10 15:43:08.323760397 +0000 +@@ -22,7 +22,7 @@ + try: + from PyQt5.QtCore import PYQT_VERSION_STR + +- PYQT_VERSION = tuple(map(int, PYQT_VERSION_STR.split("."))) ++ PYQT_VERSION = tuple(map(int, PYQT_VERSION_STR.split(".")[:3])) + except ImportError: # pragma: no cover # PyQt is there in tests, using None is tested + # We check explicitly for None before using the tuple version + PYQT_VERSION = None # type: ignore diff --git a/changelog b/changelog new file mode 100644 index 0000000..2aae1e2 --- /dev/null +++ b/changelog @@ -0,0 +1,61 @@ +* Sat Jul 22 2023 Fedora Release Engineering - 0.8.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jun 16 2023 Python Maint - 0.8.0-9 +- Rebuilt for Python 3.12 + +* Sat Jan 21 2023 Fedora Release Engineering - 0.8.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 0.8.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 0.8.0-6 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 0.8.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Aug 03 2021 Benjamin A. Beasley - 0.8.0-4 +- A little closer to running tests now that pytest-bdd *is* in Fedora +- Update obsolete macros + +* Fri Jul 23 2021 Fedora Release Engineering - 0.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 0.8.0-2 +- Rebuilt for Python 3.10 + +* Sun Mar 28 2021 Ankur Sinha - 0.8.0-1 +- Update to latest release + +* Wed Jan 27 2021 Fedora Release Engineering - 0.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.7.0-2 +- Rebuilt for Python 3.9 + +* Sun May 17 2020 Ankur Sinha - 0.7.0-1 +- Update to new release + +* Sat Mar 07 2020 Ankur Sinha - 0.6.1-1 +- Update to new release + +* Fri Jan 31 2020 Fedora Release Engineering - 0.5.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 21 2020 Ankur Sinha - 0.5.0-2 +- Add python3-qt5 as dependency: required for SVG + +* Wed Jan 15 2020 Ankur Sinha - 0.5.0-1 +- Update to 0.5.0 + +* Sat Nov 09 2019 Ankur Sinha - 0.3.0-1 +- Make description for doc package longer than summary +- Remove docs sub package + +* Fri Nov 08 2019 Ankur Sinha - 0.3.0-1 +- Initial build diff --git a/sources b/sources index 03e3754..ead345f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vimiv-qt-0.7.0.tar.gz) = d73572bf2c9888290ea9889c13b099f72f0d4c379bd50ed26ca7f9af7d4a7d67e161caa0142145cb0dddaee80bb72714c8dab803e7090437ac43d1df26e10114 +SHA512 (vimiv-qt-0.9.0.tar.gz) = bf8207da1d84a6a47dda04ff06303d553a866e413521057e0c5ba0492a705abe9c941367e8977621ba695f4f8fcf7f2461f53feb4456842973977b8e07d4dd56 diff --git a/vimiv-qt.spec b/vimiv-qt.spec index c63a44e..e7584f3 100644 --- a/vimiv-qt.spec +++ b/vimiv-qt.spec @@ -1,9 +1,9 @@ # Disabled by default, rely on upstream's test -# Requires pytest-bdd that is not in Fedora +# Requires pytest-qt, not yet packaged in Fedora %bcond_with tests -%global pypi_name vimiv-qt %global binname vimiv +%global appdataid org.karlch.vimiv.qt %global _description %{expand: Vimiv is an image viewer with vim-like keybindings. It is written in python3 @@ -20,29 +20,32 @@ The initial GTK3 version of vimiv will no longer be maintained. Full documentation is available at https://karlch.github.io/vimiv-qt.} -Name: %{pypi_name} -Version: 0.7.0 -Release: 3%{?dist} +Name: vimiv-qt +Version: 0.9.0 +Release: %autorelease Summary: An image viewer with vim-like keybindings -License: GPLv3+ +License: GPL-3.0-or-later URL: https://karlch.github.io/vimiv-qt/ Source0: https://github.com/karlch/vimiv-qt/archive/v%{version}/%{name}-%{version}.tar.gz +# Backport: https://github.com/karlch/vimiv-qt/commit/0902c81a4cefc516cfdac3627a23bcd133291580 +Patch: 0001-fix-check-version.patch +BuildRequires: make BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-qt5-devel +BuildRequires: python3-pyqt6-devel BuildRequires: /usr/bin/appstream-util BuildRequires: /usr/bin/desktop-file-validate %if %{with tests} BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist pytest-bdd} BuildRequires: %{py3_dist flaky} %endif # Not listed in setup.py -Requires: python3-piexif -# python3-qt5-base is pulled in but SVG requires python3-qt5 -Requires: python3-qt5 +Recommends: %{py3_dist piexif} + # For icons Requires: hicolor-icon-theme @@ -52,73 +55,54 @@ Requires: hicolor-icon-theme Provides: vimiv = 0.9.2 Obsoletes: vimiv < 0.9.1-14 -%{?python_enable_dependency_generator} -%{?python_provide:%python_provide python3-%{pypi_name}} +%py_provides python3-%{binname} %description %_description %prep -%autosetup -n %{pypi_name}-%{version} -rm -rf %{pypi_name}.egg-info -# Don't do the python bit there -mv -v misc/Makefile . -sed -i '/python3 setup.py install/ d' Makefile -sed -i '/LICENSE/ d' Makefile +%autosetup -n vimiv-qt-%{version} -p1 +rm -rf vimiv-qt.egg-info + # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also # find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' +# update req +sed -i 's/"PyQt5>=.*"/"PyQt6"/' setup.py +cat setup.py + +# Don't do the python bit there +mv -v misc/Makefile . +sed -i '/python3 setup.py install/ d' Makefile +sed -i '/LICENSE/ d' Makefile + +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{binname} + %make_install -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{binname}.appdata.xml +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{appdataid}.metainfo.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/%{binname}.desktop %check %if %{with tests} -pytest-%{python3_version} +%pytest %endif -%files -%license LICENSE +%files -f %{pyproject_files} %doc README.md -%{python3_sitearch}/%{binname}-%{version}-py%{python3_version}.egg-info -%{python3_sitearch}/%{binname} %{_bindir}/%{binname} %{_datadir}/applications/%{binname}.desktop %{_datadir}/icons/hicolor/*/apps/%{binname}.* -%{_metainfodir}/%{binname}.appdata.xml +%{_metainfodir}/%{appdataid}.metainfo.xml %{_mandir}/man1/%{binname}.* %changelog -* Wed Jul 29 2020 Fedora Release Engineering - 0.7.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Miro Hrončok - 0.7.0-2 -- Rebuilt for Python 3.9 - -* Sun May 17 2020 Ankur Sinha - 0.7.0-1 -- Update to new release - -* Sat Mar 07 2020 Ankur Sinha - 0.6.1-1 -- Update to new release - -* Fri Jan 31 2020 Fedora Release Engineering - 0.5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Jan 21 2020 Ankur Sinha - 0.5.0-2 -- Add python3-qt5 as dependency: required for SVG - -* Wed Jan 15 2020 Ankur Sinha - 0.5.0-1 -- Update to 0.5.0 - -* Sat Nov 09 2019 Ankur Sinha - 0.3.0-1 -- Make description for doc package longer than summary -- Remove docs sub package - -* Fri Nov 08 2019 Ankur Sinha - 0.3.0-1 -- Initial build +%autochangelog