diff --git a/.python-flexmock.metadata b/.python-flexmock.metadata new file mode 100644 index 0000000..1998b7a --- /dev/null +++ b/.python-flexmock.metadata @@ -0,0 +1 @@ +2320bb6c9b48724f92ac02f065931b3fef66c095 SOURCES/flexmock-v0.12.2.tar.gz diff --git a/SOURCES/0001-Remove-zope-testrunner-usage.patch b/SOURCES/0001-Remove-zope-testrunner-usage.patch new file mode 100644 index 0000000..a9481d4 --- /dev/null +++ b/SOURCES/0001-Remove-zope-testrunner-usage.patch @@ -0,0 +1,78 @@ +From c9e04ccb0455a0c212649022691693e8eb39c54d Mon Sep 17 00:00:00 2001 +From: Joel Capitao +Date: Thu, 6 Feb 2025 07:42:34 -0500 +Subject: [PATCH] Remove zope-testrunner usage + +--- + poetry.lock | 21 --------------------- + pyproject.toml | 1 - + tox.ini | 2 -- + 3 files changed, 24 deletions(-) + +diff --git a/poetry.lock b/poetry.lock +index b0f7a5d..8a7e273 100644 +--- a/poetry.lock ++++ b/poetry.lock +@@ -1993,27 +1993,6 @@ docs = ["Sphinx", "furo", "repoze.sphinx.autointerface"] + test = ["coverage[toml]", "zope.event", "zope.testing"] + testing = ["coverage[toml]", "zope.event", "zope.testing"] + +-[[package]] +-name = "zope-testrunner" +-version = "6.6.1" +-description = "Zope testrunner script." +-optional = false +-python-versions = ">=3.8" +-files = [ +- {file = "zope.testrunner-6.6.1-py3-none-any.whl", hash = "sha256:6d3f19d19601006fcee110826391502f9a148541ecb18ec41358f182426f8d21"}, +- {file = "zope_testrunner-6.6.1.tar.gz", hash = "sha256:949426d4ae5f572dc8a6b07309f26f4da4e63e6f91e03bc7c4b9f5b8f6db0650"}, +-] +- +-[package.dependencies] +-setuptools = "*" +-"zope.exceptions" = "*" +-"zope.interface" = "*" +- +-[package.extras] +-docs = ["Sphinx", "sphinxcontrib-programoutput"] +-subunit = ["python-subunit (>=1.4.3)", "testtools (>=0.9.30)"] +-test = ["zope.testing"] +- + [metadata] + lock-version = "2.0" + python-versions = "^3.8.0" +diff --git a/pyproject.toml b/pyproject.toml +index 005d421..2b371ad 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -68,7 +68,6 @@ markdown-include = "*" + mkdocstrings = { extras = ["python-legacy"], version = "*" } + testtools = "*" + myst-parser = "*" +-"zope.testrunner" = "*" + python-subunit = "*" + teamcity-messages = "*" + # Sphinx v7 drops setuptools support. +diff --git a/tox.ini b/tox.ini +index 0b9474a..f94656a 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -25,7 +25,6 @@ deps = + pytest8: pytest>=8.0,<9.0 + pytest-latest: pytest + twisted +- zope.testrunner + testtools + python-subunit + teamcity-messages +@@ -37,7 +36,6 @@ commands = + python tests/test_unittest.py + python tests/test_doctest.py + python -c "from twisted.scripts.trial import run; run();" tests/test_generic_integration.py +- zope-testrunner --test-path=./ --test-file-pattern=test_generic_integration --verbose + python -m testtools.run --verbose tests/test_testtools.py + sh -c 'python -m subunit.run tests/test_generic_integration.py | subunit2pyunit' + python tests/test_teamcity.py +-- +2.43.5 + diff --git a/SPECS/python-flexmock.spec b/SPECS/python-flexmock.spec new file mode 100644 index 0000000..50fc84a --- /dev/null +++ b/SPECS/python-flexmock.spec @@ -0,0 +1,274 @@ +Name: python-flexmock +Version: 0.12.2 +Release: 3%{?dist} +Summary: Testing library that makes it easy to create mocks, stubs and fakes + +License: BSD-2-Clause-Views + +URL: https://flexmock.readthedocs.org +Source0: https://github.com/flexmock/flexmock/archive/v%{version}/flexmock-v%{version}.tar.gz + +Patch0001: 0001-Remove-zope-testrunner-usage.patch + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +# Test-only dep +# https://github.com/flexmock/flexmock/blob/54401b5a138e9216bb7eb258cb80cdb1f78e8519/tox.ini#L37 +BuildRequires: /usr/bin/subunit2pyunit + +%global _description\ +Flexmock is a testing library for Python that makes it easy to create mocks,\ +stubs and fakes. The API is inspired by a Ruby library of the same name, but\ +Python flexmock is not a clone of the Ruby version. It omits a number of\ +redundancies in the Ruby flexmock API, alters some defaults, and introduces\ +a number of Python-only features.\ + +%description %_description + + +%package -n python3-flexmock +Summary: %{summary} + +%{?python_provide:%python_provide python3-flexmock} + +%description -n python3-flexmock %_description + + +%prep +%autosetup -p1 -n flexmock-%{version} +# teamcity-messages package not yet available in Fedora +sed -i "/teamcity-messages$/d" tox.ini +sed -i "/test_teamcity.py$/d" tox.ini +# Upstream manipulates PYTHONPATH which breaks testing +sed -i "/setenv = PYTHONPATH/d" tox.ini + + +%generate_buildrequires +%pyproject_buildrequires -r -e %{toxenv}-pytest-latest + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files flexmock + + +%check +PYTHONPATH=.:%{buildroot}/%{python3_sitelib} %tox + +# Remove misplaced files +rm -rf %{buildroot}/%{python3_sitelib}/{LICENSE,docs,*.md,tests} + + +%files -n python3-flexmock -f %{pyproject_files} +%license LICENSE +%doc README.md CHANGELOG.md docs/ + +%changelog +* Thu Feb 06 2025 Joel Capitao - 0.12.2-3 +- Remove zope-testrunner usage + +* Sat Jan 18 2025 Fedora Release Engineering - 0.12.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Jan 06 2025 Lumir Balhar - 0.12.2-1 +- Update to 0.12.2 (rhbz#2334314) + +* Fri Jul 19 2024 Fedora Release Engineering - 0.12.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sun Jun 09 2024 Python Maint - 0.12.1-2 +- Rebuilt for Python 3.13 + +* Tue Apr 02 2024 Lumir Balhar - 0.12.1-1 +- Update to 0.12.1 (rhbz#2272219) + +* Sun Mar 17 2024 Lumir Balhar - 0.12.0-1 +- Update to 0.12.0 (rhbz#2269807) + +* Wed Mar 13 2024 Lumír Balhar - 0.11.3-10 +- Fix build with newer subunit +Resolves: rhbz#2261561 + +* Fri Jan 26 2024 Fedora Release Engineering - 0.11.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.11.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 0.11.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 28 2023 Python Maint - 0.11.3-6 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.11.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 25 2022 Hunor Csomortáni - 0.11.3-4 +- Migrate license to SPDX format + +* Fri Jul 22 2022 Fedora Release Engineering - 0.11.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jun 15 2022 Python Maint - 0.11.3-2 +- Rebuilt for Python 3.11 + +* Fri Feb 11 2022 Lumír Balhar - 0.11.3-1 +- Update to 0.11.3 +Resolves: rhbz#2052771 + +* Fri Jan 21 2022 Fedora Release Engineering - 0.11.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jan 05 2022 Lumír Balhar - 0.11.2-1 +- Update to 0.11.2 +Resolves: rhbz#2036905 + +* Mon Nov 08 2021 Lumír Balhar - 0.11.1-1 +- Update to 0.11.1 +Resolves: rhbz#2021023 + +* Wed Sep 22 2021 Hunor Csomortáni - 0.10.10-1 +- Update to 0.10.10 (#2001223) + +* Mon Aug 30 2021 Lumír Balhar - 0.10.8-1 +- Update to 0.10.8 +Resolves: rhbz#1996607 + +* Tue Aug 17 2021 Lumír Balhar - 0.10.6-1 +- Update to 0.10.6 +Resolves: rhbz#1993956 + +* Thu Jul 22 2021 Lumír Balhar - 0.10.5-1 +- Update to 0.10.5 + +* Fri Jun 04 2021 Python Maint - 0.10.4-11 +- Rebuilt for Python 3.10 + +* Mon Feb 08 2021 Charalampos Stratakis - 0.10.4-10 +- Remove deprecated python-nose dependency + +* Wed Jan 27 2021 Fedora Release Engineering - 0.10.4-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.10.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.10.4-7 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.10.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 0.10.4-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.10.4-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.10.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue May 07 2019 Miro Hrončok - 0.10.4-2 +- Drop python2-flexmock + +* Fri Apr 12 2019 Miro Hrončok - 0.10.4-1 +- Update to 0.10.4 for pytest 4 compatibility (#1699241) + +* Sat Feb 02 2019 Fedora Release Engineering - 0.10.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jul 25 2018 Miro Hrončok - 0.10.2-14 +- Don't own /usr/lib/python3.7/site-packages/__pycache__ + +* Sat Jul 21 2018 Zbigniew Jędrzejewski-Szmek - 0.10.2-13 +- Use versioned python macro in %%files + +* Fri Jul 20 2018 Kevin Fenzi - 0.10.2-12 +- Fix FTBFS bug #1605695 + +* Sat Jul 14 2018 Fedora Release Engineering - 0.10.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 0.10.2-10 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.10.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 18 2018 Iryna Shcherbina - 0.10.2-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.10.2-7 +- Python 2 binary package renamed to python2-flexmock + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 0.10.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.10.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 0.10.2-4 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 0.10.2-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 0.10.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 21 2016 Slavek Kabrda - 0.10.2-1 +- Update to 0.10.2 + +* Thu Dec 17 2015 Slavek Kabrda - 0.10.1-1 +- Update to 0.10.1 + +* Fri Dec 11 2015 Slavek Kabrda - 0.10.0-1 +- Update to 0.10.0 + +* Tue Nov 10 2015 Fedora Release Engineering - 0.9.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 0.9.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Nov 14 2014 Slavek Kabrda - 0.9.7-1 +- Update to 0.9.7. + +* Sat Jun 07 2014 Fedora Release Engineering - 0.9.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 13 2014 Bohuslav Kabrda - 0.9.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.9.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 0.9.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Nov 05 2012 Bohuslav Kabrda - 0.9.6-1 +- Update to 0.9.6. + +* Sat Aug 04 2012 David Malcolm - 0.9.4-3 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + +* Sat Jul 21 2012 Fedora Release Engineering - 0.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri May 25 2012 Bohuslav Kabrda - 0.9.4-1 +- Update to flexmock 0.9.4. +- The patch is now part of upstream => remove it. +- Introduce Python 3 subpackage. +- Add documentation files, that are now part of source package. + +* Tue Feb 21 2012 Bohuslav Kabrda - 0.9.2-1 +- Initial package.