From 65a2e226671cf608c4a6bcb72e60b57864ac10fc23d2e164080121b8586f91e6 Mon Sep 17 00:00:00 2001 From: Malcolm Lewis Date: Tue, 25 Feb 2025 14:37:13 +0000 Subject: [PATCH] - Update to 0.18.1 * Update build for/on fedora41 * Remove entry point - from version 0.18.0 * Avoid "id" as a varname, because it clashes with a python built-in name * Remove remaining Python2 compat layer * Clean-up pydistman/cookiecutter fluff before PyPI * Clean-up pydistman/cookiecutter fluff before prepping a PyPI package - Adjust sed statement to drop shebangs instead of modifying them - Drop python-pysol-cards-no-six.patch, fixed upstream - Remove pysol_cards binary from %files section - Switch package to modern Python Stack on SLE-15 * Use Python 3.11 on SLE-15 by default * Drop support for older Python versions OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysol-cards?expand=0&rev=13 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + pysol_cards-0.16.0.tar.gz | 3 ++ pysol_cards-0.18.1.tar.gz | 3 ++ python-pysol-cards-no-six.patch | 59 +++++++++++++++++++++++++ python-pysol-cards.changes | 77 +++++++++++++++++++++++++++++++++ python-pysol-cards.spec | 67 ++++++++++++++++++++++++++++ 7 files changed, 233 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pysol_cards-0.16.0.tar.gz create mode 100644 pysol_cards-0.18.1.tar.gz create mode 100644 python-pysol-cards-no-six.patch create mode 100644 python-pysol-cards.changes create mode 100644 python-pysol-cards.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/pysol_cards-0.16.0.tar.gz b/pysol_cards-0.16.0.tar.gz new file mode 100644 index 0000000..d16e14e --- /dev/null +++ b/pysol_cards-0.16.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b87ca7b3f99155cccd3cfd739f739f7744d6f8198222c6d493a034a3d4570c3 +size 18987 diff --git a/pysol_cards-0.18.1.tar.gz b/pysol_cards-0.18.1.tar.gz new file mode 100644 index 0000000..bf72dde --- /dev/null +++ b/pysol_cards-0.18.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:103c7c0c319e72e836e099bbb47ff54be729d975e35c11ba74d4ac5e4286b8eb +size 17975 diff --git a/python-pysol-cards-no-six.patch b/python-pysol-cards-no-six.patch new file mode 100644 index 0000000..00d6877 --- /dev/null +++ b/python-pysol-cards-no-six.patch @@ -0,0 +1,59 @@ +Index: pysol_cards-0.16.0/pysol_cards.egg-info/requires.txt +=================================================================== +--- pysol_cards-0.16.0.orig/pysol_cards.egg-info/requires.txt ++++ pysol_cards-0.16.0/pysol_cards.egg-info/requires.txt +@@ -1,2 +1 @@ + random2 +-six +Index: pysol_cards-0.16.0/pysol_cards/deal_game.py +=================================================================== +--- pysol_cards-0.16.0.orig/pysol_cards/deal_game.py ++++ pysol_cards-0.16.0/pysol_cards/deal_game.py +@@ -13,9 +13,6 @@ from pysol_cards.cards import Card + from pysol_cards.cards import createCards + from pysol_cards.random import shuffle + +-from six import print_ +- +- + def empty_card(): + ret = Card(0, 0, 0) + ret.empty = True +@@ -170,7 +167,7 @@ class Game(object): + return self.board.calc_string(renderer) + + def print_layout(self, renderer): +- print_(self.calc_layout_string(renderer), sep='', end='') ++ print(self.calc_layout_string(renderer), sep='', end='') + + def new_cards(self, cards): + self.cards = cards +@@ -304,7 +301,7 @@ class Game(object): + def der_katz(game): + is_ds = game.game_id == 'die_schlange' + if is_ds: +- print_('Foundations: H-A S-A D-A C-A H-A S-A D-A C-A') ++ print('Foundations: H-A S-A D-A C-A H-A S-A D-A C-A') + game.board = Board(9) + i = 0 + for c in game: +Index: pysol_cards-0.16.0/requirements.txt +=================================================================== +--- pysol_cards-0.16.0.orig/requirements.txt ++++ pysol_cards-0.16.0/requirements.txt +@@ -1,2 +1 @@ + random2 +-six +Index: pysol_cards-0.16.0/setup.py +=================================================================== +--- pysol_cards-0.16.0.orig/setup.py ++++ pysol_cards-0.16.0/setup.py +@@ -29,7 +29,7 @@ setup(name='pysol_cards', + ], + packages=find_packages(exclude=('tests', 'tests.*')), + include_package_data=True, +- install_requires=['random2','six'], ++ install_requires=['random2'], + entry_points={ + 'console_scripts': [ + 'pysol_cards = pysol_cards.__main__:main', diff --git a/python-pysol-cards.changes b/python-pysol-cards.changes new file mode 100644 index 0000000..c94821f --- /dev/null +++ b/python-pysol-cards.changes @@ -0,0 +1,77 @@ +------------------------------------------------------------------- +Tue Feb 25 14:04:45 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 0.18.1 + * Update build for/on fedora41 + * Remove entry point +- from version 0.18.0 + * Avoid "id" as a varname, because it clashes with a python built-in name + * Remove remaining Python2 compat layer + * Clean-up pydistman/cookiecutter fluff before PyPI + * Clean-up pydistman/cookiecutter fluff before prepping a PyPI package +- Adjust sed statement to drop shebangs instead of modifying them +- Drop python-pysol-cards-no-six.patch, fixed upstream +- Remove pysol_cards binary from %files section +- Switch package to modern Python Stack on SLE-15 + * Use Python 3.11 on SLE-15 by default + * Drop support for older Python versions + +------------------------------------------------------------------- +Thu Nov 28 08:40:26 UTC 2024 - Dirk Müller + +- remove unneeded dependencies + +------------------------------------------------------------------- +Mon Mar 4 00:42:10 UTC 2024 - Steve Kowalik + +- Update to 0.16.0: + * Add support for dealing "binary_star". + * Add tests. + * Try to fix getstate() / setstate() ; with tests +- Switch to pyproject and autosetup macros. +- No more greedy globs in %files. +- Actually drop {Build,}Requires on six. +- Refresh python-pysol-cards-no-six.patch. + +------------------------------------------------------------------- +Thu Dec 8 10:07:54 UTC 2022 - pgajdos@suse.com + +- version update to 0.14.2 + 0.14.2 + * Avoid requiring optional deps - https://github.com/shlomif/pysol_cards/issues/4 . + 0.14.1 + * Avoid comments in requirements.txt - https://github.com/shlomif/pysol_cards/issues/4 . + 0.14.0 + * Convert from pbr to https://pypi.org/project/pydistman/ . + 0.12.0 + * bump ver + * enhance the README + * 'id' is a builtin + * add a test using named arguments + * optimize into a class var + * optimize + * add an integration test +- added patches + fix https://github.com/shlomif/pysol_cards/issues/6 + + python-pysol-cards-no-six.patch + +------------------------------------------------------------------- +Mon Jun 7 12:37:23 UTC 2021 - Dominique Leuenberger + +- Only build for python3- flavor, as -oslotest is only built for + the main flavor too. + +------------------------------------------------------------------- +Wed Aug 5 15:27:44 UTC 2020 - Marketa Calabkova + +- Update to 0.10.1 + * allow accepting "ms[0-9]+" game nums + * add single\_deal\_args\_parse + * better PySol compat: fix reset() + * better PySol compat: str2int+int2str + +------------------------------------------------------------------- +Sat Mar 14 14:59:47 UTC 2020 - malcolmlewis@opensuse.org + +- Initial build at version 0.8.8. + diff --git a/python-pysol-cards.spec b/python-pysol-cards.spec new file mode 100644 index 0000000..24b058e --- /dev/null +++ b/python-pysol-cards.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-pysol-cards +# +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2020 Malcolm J Lewis +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-pysol-cards +Version: 0.18.1 +Release: 0 +Summary: Python module for pysol-cards +License: Apache-2.0 +URL: https://pypi.org/project/pysol-cards/ +Source: https://files.pythonhosted.org/packages/source/p/pysol_cards/pysol_cards-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module random2} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-random2 +BuildArch: noarch +%python_subpackages + +%description +This module allows the python developer to generate the initial deals of some +PySol FC games. It also supports PySol legacy deals and Microsoft FreeCell / +Freecell Pro deals. + +%prep +%autosetup -p1 -n pysol_cards-%{version} +find . -name "*.py" -exec sed -i '/\#\!\ \/usr\/bin\/env\ python/d' {} \; + +%build +export LC_ALL=en_US.utf8 +%pyproject_wheel + +%install +export LC_ALL=en_US.utf8 +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib}/ + +%check +sed -i '/^addopts/d' setup.cfg +%pytest + +%files %{python_files} +%doc AUTHORS CHANGELOG.rst README.rst +%license LICENSE +%{python_sitelib}/pysol_cards +%{python_sitelib}/pysol_cards-%{version}.dist-info + +%changelog