commit 6b1fa32d72c074661357690f4f5b999d80fdf10dc17d52a13148ef23b2fd651c Author: Dirk Mueller Date: Thu May 15 15:17:31 2025 +0000 - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-case?expand=0&rev=17 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/case-1.5.3.tar.gz b/case-1.5.3.tar.gz new file mode 100644 index 0000000..313ac4b --- /dev/null +++ b/case-1.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48432b01d91913451c3512c5b90e31b0f348f1074b166a3431085eb70d784fb1 +size 58469 diff --git a/python-case.changes b/python-case.changes new file mode 100644 index 0000000..375f97c --- /dev/null +++ b/python-case.changes @@ -0,0 +1,77 @@ +------------------------------------------------------------------- +Thu May 15 12:51:38 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Sun Jun 11 13:54:56 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Oct 13 07:14:18 UTC 2022 - Dirk Müller + +- use https for urls + +------------------------------------------------------------------- +Wed Jul 20 16:23:58 UTC 2022 - Steve Kowalik + +- Remove unneeded Requires on python-mock. + +------------------------------------------------------------------- +Wed Sep 15 04:38:57 UTC 2021 - Steve Kowalik + +- Add remove-nose.patch: + * Stop using nose to skip tests. +- Adjust Requires from python-nose to python-pytest. + +------------------------------------------------------------------- +Sun Aug 16 06:43:43 UTC 2020 - John Vandenberg + +- Remove test dependencies and %check as there are no tests + +------------------------------------------------------------------- +Thu Oct 3 16:35:14 UTC 2019 - John Vandenberg + +- Remove dependency on coverage + Add remove_coverage.patch to facilitate that + +------------------------------------------------------------------- +Mon Aug 13 14:07:19 UTC 2018 - mcepl@suse.com + +- Remove dependency on unittest2 + Add remove_unittest2.patch to facilitate that + +------------------------------------------------------------------- +Wed Mar 15 10:57:58 UTC 2017 - tbechtold@suse.com + +- update to 1.5.3: + - ``patch.multiple`` now works. + - Using setup/teardown instead of setup_method/teardown_method was a bad idea. + - 1.5.0 had a left over print statement :blush: + - Pytest: When decorating classes using the ``skip.*`` and ``mock.*`` + decorators, these now augment ``cls.setup``/``cls.teardown`` instead of + ``cls.setup_method``/``cls.teardown_method``. + - Pytest: Adds ``patching.object``. + - Adds new helper: ``case.pytest.fixture_with_options``. + - All case decorators now works with py.test classes. + - Py.test: Adds new `stdouts` fixture that patches :data:`sys.stdout`, + and :data:`sys.stderr`. + - Py.test: The `patching` fixture can now mock modules. + - Case is now a py.test plug-in and provides a `patching` fixture + as a shortcut to `monkeypatch` setting the value to a mock. + - Case decorators now supports py.test. + - Patcher created by create_patcher now accepts *args. + - ``mock.reload_modules``: Fixed compatibility with Python 3. + - ``mock.reload_modules`` now re-imports the module and + calls ``reload()`` on it. + - Adds ``mock.mute`` decorator to suppress stdout with no return value. + - Adds ``Mock.on_nth_call_do_raise(excA, excB, n)``. +- Fix license +- Convert to singlespec approach + +------------------------------------------------------------------- +Fri Jun 3 17:12:53 UTC 2016 - tbechtold@suse.com + +- Initial packaging (version 1.1.4) + diff --git a/python-case.spec b/python-case.spec new file mode 100644 index 0000000..192914e --- /dev/null +++ b/python-case.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-case +# +# Copyright (c) 2025 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-case +Version: 1.5.3 +Release: 0 +Summary: Python unittest Utilities +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/celery/case +Source: https://files.pythonhosted.org/packages/source/c/case/case-%{version}.tar.gz +Patch0: remove_unittest2.patch +Patch1: remove_coverage.patch +Patch2: remove-nose.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-pytest +Requires: python-setuptools +Requires: python-six +BuildArch: noarch +%python_subpackages + +%description +Python unittest Utilities. + +%prep +%setup -q -n case-%{version} +%autopatch -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +#%%check no tests exist https://github.com/celery/case/issues/8 + +%files %{python_files} +%license LICENSE +%doc Changelog README.rst +%{python_sitelib}/case +%{python_sitelib}/case-%{version}*-info + +%changelog diff --git a/remove-nose.patch b/remove-nose.patch new file mode 100644 index 0000000..11ad72a --- /dev/null +++ b/remove-nose.patch @@ -0,0 +1,13 @@ +Index: case-1.5.3/case/skip.py +=================================================================== +--- case-1.5.3.orig/case/skip.py ++++ case-1.5.3/case/skip.py +@@ -4,7 +4,7 @@ import importlib + import os + import sys + +-from nose import SkipTest ++from unittest import SkipTest + + from .utils import decorator, symbol_by_name + diff --git a/remove_coverage.patch b/remove_coverage.patch new file mode 100644 index 0000000..1f21d3b --- /dev/null +++ b/remove_coverage.patch @@ -0,0 +1,6 @@ +Index: case-1.5.3/requirements/test.txt +=================================================================== +--- case-1.5.3.orig/requirements/test.txt ++++ case-1.5.3/requirements/test.txt +@@ -1 +0,0 @@ +-coverage>=3.0 diff --git a/remove_unittest2.patch b/remove_unittest2.patch new file mode 100644 index 0000000..2b05939 --- /dev/null +++ b/remove_unittest2.patch @@ -0,0 +1,31 @@ +--- a/requirements/py2.txt ++++ b/requirements/py2.txt +@@ -1,2 +1 @@ + -r deps/mock.txt +-unittest2>=0.5.1 +--- a/case/case.py ++++ b/case/case.py +@@ -4,21 +4,15 @@ import re + import sys + import types + import warnings ++import unittest + + from contextlib import contextmanager + from functools import partial ++from unittest.util import safe_repr, unorderable_list_difference + from six import string_types, itervalues as values, iteritems as items + + from . import mock + +-try: +- import unittest # noqa +- unittest.skip +- from unittest.util import safe_repr, unorderable_list_difference +-except AttributeError: +- import unittest2 as unittest # noqa +- from unittest2.util import safe_repr, unorderable_list_difference # noqa +- + __all__ = ['Case'] + +