diff --git a/.gitignore b/.gitignore index ea43618..831750a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1 @@ PySolFC-2.0.tar.bz2 -/PySolFC-2.6.4.tar.xz -/PySolFC-Cardsets--Minimal-2.0.tar.xz -/PySolFC-2.8.0.tar.xz -/PySolFC-2.10.0.tar.xz -/PySolFC-2.12.0.tar.xz -/PySolFC-Cardsets--Minimal-2.0.2.tar.xz -/PySolFC-2.14.0.tar.xz -/PySolFC-2.14.1.tar.xz -/PySolFC-2.15.0.tar.xz -/PySolFC-Cardsets--Minimal-2.1.0.tar.xz -/PySolFC-2.18.0.tar.xz -/PySolFC-2.20.0.tar.xz -/PySolFC-2.20.1.tar.xz -/PySolFC-Cardsets--Minimal-2.2.0.tar.xz -/PySolFC-2.21.0.tar.xz -/PySolFC-3.0.0.tar.xz -/PySolFC-Cardsets--Minimal-3.0.0.tar.xz -/PySolFC-3.1.0.tar.xz -/PySolFC-3.2.0.tar.xz -/PySolFC-3.4.0.tar.xz diff --git a/PySolFC-desktop-exec.patch b/PySolFC-desktop-exec.patch index 7d602f3..849fd2a 100644 --- a/PySolFC-desktop-exec.patch +++ b/PySolFC-desktop-exec.patch @@ -1,11 +1,11 @@ ---- PySolFC-2.8.0/data/pysol.desktop.orig 2020-03-20 10:25:30.037977009 +0200 -+++ PySolFC-2.8.0/data/pysol.desktop 2020-03-20 10:25:37.655003734 +0200 +--- data/pysol.desktop.orig 2010-02-22 21:36:45.355136299 -0500 ++++ data/pysol.desktop 2010-02-22 21:36:52.171434787 -0500 @@ -1,7 +1,7 @@ [Desktop Entry] + Encoding=UTF-8 Name=PySol Fan Club Edition - Comment=More than 1000 solitaire card games -Exec=pysol.py +Exec=pysol - StartupWMClass=Pysol Terminal=false Type=Application + Categories=Game;CardGame; diff --git a/PySolFC-pillow.patch b/PySolFC-pillow.patch new file mode 100644 index 0000000..454581e --- /dev/null +++ b/PySolFC-pillow.patch @@ -0,0 +1,44 @@ +Index: PySolFC-2.0/pysollib/mfxutil.py +=================================================================== +--- PySolFC-2.0.orig/pysollib/mfxutil.py ++++ PySolFC-2.0/pysollib/mfxutil.py +@@ -41,18 +41,18 @@ from settings import PACKAGE, TOOLKIT + Image = ImageTk = ImageOps = None + if TOOLKIT == 'tk': + try: # PIL +- import Image +- import ImageTk +- import ImageOps ++ from PIL import Image ++ from PIL import ImageTk ++ from PIL import ImageOps + except ImportError: + Image = None + else: + # for py2exe +- import GifImagePlugin +- import PngImagePlugin +- import JpegImagePlugin +- import BmpImagePlugin +- import PpmImagePlugin ++ from PIL import GifImagePlugin ++ from PIL import PngImagePlugin ++ from PIL import JpegImagePlugin ++ from PIL import BmpImagePlugin ++ from PIL import PpmImagePlugin + Image._initialized = 2 + + +Index: PySolFC-2.0/scripts/cardset_viewer.py +=================================================================== +--- PySolFC-2.0.orig/scripts/cardset_viewer.py ++++ PySolFC-2.0/scripts/cardset_viewer.py +@@ -7,7 +7,7 @@ from glob import glob + from math import sqrt, sin, cos, pi + from Tkinter import * + try: +- import Image, ImageTk ++ from PIL import Image, ImageTk + except ImportError: + Image = None + diff --git a/PySolFC-pycotap_not_required_to_run.patch b/PySolFC-pycotap_not_required_to_run.patch deleted file mode 100644 index 93be760..0000000 --- a/PySolFC-pycotap_not_required_to_run.patch +++ /dev/null @@ -1,12 +0,0 @@ -pycotap is only needed for the single unittest , tap_unittests.py - ---- ./setup.py.orig 2023-12-01 18:05:30.725608311 +0000 -+++ ./setup.py 2023-12-01 18:05:46.564570718 +0000 -@@ -74,7 +74,6 @@ kw = { - 'install_requires': [ - 'attrs>=18.2.0', - 'configobj', -- 'pycotap', - 'pysol_cards', - 'random2', - 'six', diff --git a/PySolFC.spec b/PySolFC.spec index 53e7ac2..c7ecdf8 100644 --- a/PySolFC.spec +++ b/PySolFC.spec @@ -1,72 +1,57 @@ -%global cardsets_minimal_ver 3.0.0 +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%define debug_package %{nil} + +%define cardsetversion 1.1 Name: PySolFC -Version: 3.4.0 -Release: 5%{?dist} -Summary: A collection of solitaire card games -License: GPL-2.0-or-later -URL: https://pysolfc.sourceforge.io -Source0: https://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.xz +Version: 2.0 +Release: 8%{?dist} +Summary: A collection of solitare card games +Group: Amusements/Games +License: GPLv2+ +URL: http://pysolfc.sourceforge.net +Source0: http://downloads.sourceforge.net/pysolfc/%{name}-%{version}.tar.bz2 Source1: pysol-start-script -Source2: https://downloads.sourceforge.net/pysolfc/PySolFC-Cardsets--Minimal-%{cardsets_minimal_ver}.tar.xz Patch0: PySolFC-desktop-exec.patch +Patch1: PySolFC-pillow.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: desktop-file-utils -BuildRequires: perl-interpreter -BuildRequires: tcl-devel < 1:9 -BuildRequires: tk-devel < 1:9 - -%if 0%{?fedora} -# optional but nice to have but not available in any epel branch -# freecell-solver already requires libsfreecell-solver -Recommends: freecell-solver -Recommends: python%{python3_pkgversion}-freecell_solver -%endif - -Requires: python%{python3_pkgversion}-imaging -Requires: tile +# optional but nice to have +Requires: python-imaging, tile # used to get sound working with PulseAudio -Requires: python%{python3_pkgversion}-pygame +Requires: pygame # really required -# Requires: tcl >= 9 -# Requires: tk >= 9 -Requires: tix -Requires: python%{python3_pkgversion}-tkinter -Requires: python%{python3_pkgversion}-imaging-tk -%if 0%{?fedora} || 0%{?rhel} > 7 -Recommends: PySolFC-cardsets -Recommends: PySolFC-music -%else -# el7 doesn't detect these dependencies -Requires: python%{python3_pkgversion}-pysol-cards -Requires: python3-configobj -Requires: python36-attrs -%endif - +Requires: tcl +Requires: tk, tix, tkinter +Requires: python-imaging-tk +BuildRequires: python-devel +BuildRequires: desktop-file-utils Provides: pysol = %{version}-%{release} %description %{name} is a collection of more than 1000 solitaire card games. It is a fork -of PySol solitaire. Its features include modern look and feel (uses Tile widget -set), multiple card-sets and tableau backgrounds, sound, unlimited undo, player +of PySol solitare. Its features include modern look and feel (uses Tile widget +set), multiple cardsets and tableau backgrounds, sound, unlimited undo, player statistics, a hint system, demo games, a solitaire wizard, support for user written plug-ins, an integrated HTML help browser, and lots of documentation. %prep -%autosetup -p1 -a2 - -%generate_buildrequires -%pyproject_buildrequires +%setup -q +%patch0 -p0 -b .desktop-exec +%patch1 -p1 %build -%pyproject_wheel +CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install -%pyproject_install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT # install desktop file desktop-file-install \ +%if 0%{?fedora} && 0%{?fedora} < 19 + --vendor="fedora" \ +%endif --delete-original \ --dir=$RPM_BUILD_ROOT/%{_datadir}/applications \ $RPM_BUILD_ROOT/%{_datadir}/applications/pysol.desktop @@ -74,233 +59,27 @@ desktop-file-install \ # install the startup wrapper mv $RPM_BUILD_ROOT%{_bindir}/pysol.py $RPM_BUILD_ROOT%{_datadir}/%{name} install -m755 %{SOURCE1} $RPM_BUILD_ROOT/%{_bindir}/pysol -cp -a PySolFC-Cardsets--Minimal-%{cardsets_minimal_ver}/cardset-* $RPM_BUILD_ROOT%{_datadir}/PySolFC -find "$RPM_BUILD_ROOT%{python3_sitelib}/pysollib" -name '*.py' | xargs -L1 perl -ln -i -E 'say if (not (($. == 1) and (m&^#![ \t]*/usr/&)))' %find_lang pysol +%clean +rm -rf $RPM_BUILD_ROOT + %files -f pysol.lang -%license COPYING -%doc README.md -%{python3_sitelib}/pysollib -%{python3_sitelib}/*dist-info +%defattr(-,root,root) +%doc README PKG-INFO COPYING +%dir %{_datadir}/%{name} +%dir %{python_sitelib}/pysollib +%{python_sitelib}/pysollib/* +%{python_sitelib}/*egg-info %{_bindir}/pysol -%{_datadir}/%{name} -%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/%{name}/* +%{_datadir}/pixmaps/* +%{_datadir}/icons/*.png %{_datadir}/applications/*.desktop %changelog -* Fri Sep 19 2025 Python Maint - 3.4.0-5 -- Rebuilt for Python 3.14.0rc3 bytecode - -* Fri Aug 15 2025 Python Maint - 3.4.0-4 -- Rebuilt for Python 3.14.0rc2 bytecode - -* Wed Jul 23 2025 Fedora Release Engineering - 3.4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jul 11 2025 Shlomi Fish 3.4.0-2 -- Remove unused / unavailable deps ( eg - python3-random2 ) -- Use pyprojectize/etc. to modernize the .spec -- rhbz#2379434 -- rhbz#2377406 - -* Sun Jun 15 2025 Packit - 3.4.0-1 -- Update to version 3.4.0 -- Resolves: rhbz#2372876 - -* Mon Jun 02 2025 Python Maint - 3.2.0-6 -- Rebuilt for Python 3.14 - -* Fri Mar 07 2025 Shlomi Fish 3.2.0-5 -- Revert to use tcl 8 / tk 8 given that is what PySolFC loads in practice. -- rhbz#2344906 - -* Tue Feb 18 2025 Shlomi Fish 3.2.0-4 -- Trying to use tcl 9 / tk 9. -- rhbz#2344906 - -* Sat Feb 08 2025 Shlomi Fish 3.2.0-3 -- Update the build process for tcl 9 / tk 9 - -* Thu Jan 16 2025 Fedora Release Engineering - 3.2.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sat Jan 11 2025 Packit - 3.2.0-1 -- Update to version 3.2.0 -- Resolves: rhbz#2337163 - -* Mon Oct 21 2024 Packit - 3.1.0-1 -- Update to version 3.1.0 -- Resolves: rhbz#2319948 - -* Wed Jul 17 2024 Fedora Release Engineering - 3.0.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 3.0.0-2 -- Rebuilt for Python 3.13 - -* Mon Jun 03 2024 Shlomi Fish 3.0.0-1 -- New upstream versions (of both "PySolFC" and "PySolFC-Cardsets--Minimal"). - pycotap patch is no longer needed so remove. - -* Sun Mar 03 2024 Sérgio Basto - 2.21.0-6 -- py3_shebang_fix is not needed and fix epel-7 build - -* Mon Jan 22 2024 Fedora Release Engineering - 2.21.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 2.21.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Dec 01 2023 Sérgio Basto - 2.21.0-3 -- Do not require pycotap to run PySol, pycotap is only needed for the single - unittest ( https://github.com/shlomif/PySolFC/pull/353 ) - -* Wed Jul 19 2023 Fedora Release Engineering - 2.21.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Wed Jul 12 2023 Shlomi Fish 2.21.0-1 -- Update PySolFC to 2.21.0. - -* Sat Jun 24 2023 Sérgio Basto - 2.20.1-4 -- Migrate to SPDX license format - -* Tue Jun 13 2023 Python Maint - 2.20.1-3 -- Rebuilt for Python 3.12 - -* Thu May 18 2023 Sérgio Basto - 2.20.1-2 -- Update cardsets_minimal_ver to 2.2.0 - -* Tue Feb 28 2023 Shlomi Fish 2.20.0-1 -- Update PySolFC to 2.20.0. - -* Wed Jan 18 2023 Fedora Release Engineering - 2.18.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Oct 12 2022 Shlomi Fish 2.18.0-1 -- Update PySolFC to 2.18.0. - -* Wed Jul 20 2022 Fedora Release Engineering - 2.15.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Python Maint - 2.15.0-3 -- Rebuilt for Python 3.11 - -* Wed May 04 2022 Sérgio Basto - 2.15.0-2 -- Fix install on EL where we don't have freecell-solver - -* Fri Apr 08 2022 Sérgio Basto - 2.15.0-1 -- Update PySolFC to 2.15.0 (#2063446) -- Update Cardsets Minimal to 2.1.0 - -* Wed Jan 19 2022 Fedora Release Engineering - 2.14.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Sat Dec 11 2021 Shlomi Fish 2.14.1-1 -- Update to 2.14.1 (#2031331) - -* Sun Sep 19 2021 Fedora Release Monitoring - 2.14.0-1 -- Update to 2.14.0 (#2005720) - -* Thu Aug 12 2021 Sérgio Basto - 2.12.0-1 -- Update to 2.12.0 - -* Thu Aug 12 2021 Sérgio Basto - 2.10.0-6 -- formatting.py deprecated fix for Pyhton 3.10 - -* Wed Jul 21 2021 Fedora Release Engineering - 2.10.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 04 2021 Python Maint - 2.10.0-4 -- Rebuilt for Python 3.10 - -* Mon Jan 25 2021 Fedora Release Engineering - 2.10.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 2.10.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jun 23 2020 Shlomi Fish 2.10.0-1 -- New upstream release -- Add BuildRequires on setuptools -- Add Requires on python3-freecell_solver - -* Tue May 26 2020 Miro Hrončok - 2.8.0-3 -- Rebuilt for Python 3.9 - -* Sat Mar 28 2020 Shlomi Fish 2.8.0-2 -- Fix or remove shebangs (RHBZ 1818150) -- Correct the changelog - -* Tue Mar 24 2020 Shlomi Fish 2.8.0-1 -- New upstream version - -* Tue Jan 28 2020 Fedora Release Engineering - 2.6.4-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Oct 03 2019 Miro Hrončok - 2.6.4-8 -- Rebuilt for Python 3.8.0rc1 (#1748018) - -* Mon Aug 19 2019 Miro Hrončok - 2.6.4-7 -- Rebuilt for Python 3.8 - -* Wed Jul 24 2019 Fedora Release Engineering - 2.6.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat May 11 2019 Sérgio Basto - 2.6.4-5 -- Fix some missing %%{python3_pkgversion} - -* Mon May 06 2019 Sérgio Basto - 2.6.4-4 -- Add Minimal Cardsets - -* Wed May 01 2019 Sérgio Basto - 2.6.4-3 -- Requires cartsets and music, clean old stuff and enable build for epel7 - -* Sun Apr 28 2019 Sérgio Basto - 2.6.4-2 -- Sound fix, seems using SOUND_MOD=auto it works - -* Fri Apr 26 2019 Sérgio Basto - 2.6.4-1 -- Upgrade to 2.6.4 and python3 by Shlomi Fish -- Modernize spec -- Add Requires: python3-random2 -- Reenable defaults of debug package and automagic Python byte compilation - -* Thu Jan 31 2019 Fedora Release Engineering - 2.0-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jul 12 2018 Fedora Release Engineering - 2.0-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 2.0-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Dec 11 2017 Iryna Shcherbina - 2.0-16 -- Fix ambiguous Python 2 dependency declarations - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Wed Jul 26 2017 Fedora Release Engineering - 2.0-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 2.0-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jul 19 2016 Fedora Release Engineering - 2.0-13 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Wed Feb 03 2016 Fedora Release Engineering - 2.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jun 16 2015 Fedora Release Engineering - 2.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Jun 06 2014 Fedora Release Engineering - 2.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri Aug 02 2013 Fedora Release Engineering - 2.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - * Wed Mar 6 2013 Toshio Kuratomi - 2.0-8 - Remove vendor prefix from desktop files in F19+ https://fedorahosted.org/fesco/ticket/1077 diff --git a/README.packit b/README.packit deleted file mode 100644 index 6beb40f..0000000 --- a/README.packit +++ /dev/null @@ -1,3 +0,0 @@ -This repository is maintained by packit. -https://packit.dev/ -The file was generated using packit 1.8.0.post1.dev31+g9980e597. diff --git a/packit.yaml b/packit.yaml deleted file mode 100644 index 7268bcf..0000000 --- a/packit.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# See the documentation for more information: -# https://packit.dev/docs/configuration/ - -jobs: - - job: pull_from_upstream - trigger: release - dist_git_branches: - rawhide: - fast_forward_merge_into: - - fedora-all - - epel-all - - - job: koji_build - trigger: commit - allowed_pr_authors: - - all_admins - - packit - dist_git_branches: - - fedora-all - - epel-all - - - job: bodhi_update - trigger: commit - dist_git_branches: - - fedora-all - - epel-all diff --git a/pysol-start-script b/pysol-start-script index 2357cc4..b0dbeb6 100644 --- a/pysol-start-script +++ b/pysol-start-script @@ -1,3 +1,3 @@ #!/bin/sh -/usr/share/PySolFC/pysol.py "$@" +/usr/share/PySolFC/pysol.py "$@" --sound-mod=pygame exit $? diff --git a/sources b/sources index 2536c04..51a1824 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (PySolFC-3.4.0.tar.xz) = 208e301cd8f8467e5078aace219a729097a851f09cd47d12ee9723e5b2127e951dfe779704ad0dedacd94c2a9a18553fcc06de8fa426d27a6794eb0d15ff128f -SHA512 (PySolFC-Cardsets--Minimal-3.0.0.tar.xz) = 9d4bacd072b450b29b9f1bec4557121a3647c2f837aeb6e249f452cb886467c5e7ca36dd36a78ea69a5c9df6f30d5245e12681d9d02fc9da2ece09c25d77e787 +f9ee647947924efdf1d24af179d3cc0a PySolFC-2.0.tar.bz2