[packages/python3-fixtures] - python-fixtures.spec updated to 4.2.5 for python 3.8+
qboosh
qboosh at pld-linux.org
Mon May 26 21:38:29 CEST 2025
commit ec53929f3257aa025ee7f53a2ec9c9a7e2d2ae70
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon May 26 21:32:37 2025 +0200
- python-fixtures.spec updated to 4.2.5 for python 3.8+
python-fixtures-mock.patch | 14 -----
python-fixtures.spec | 153 ---------------------------------------------
python3-fixtures.spec | 75 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 167 deletions(-)
---
diff --git a/python-fixtures.spec b/python-fixtures.spec
deleted file mode 100644
index 920f0dc..0000000
--- a/python-fixtures.spec
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-# Conditional build:
-%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-Summary: Fixtures, reusable state for writing clean tests and more
-Summary(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
-Name: python-fixtures
-Version: 3.0.0
-Release: 11
-License: Apache v2.0 or BSD
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/fixtures/
-Source0: https://files.pythonhosted.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
-# Source0-md5: cd6345b497a62fad739efee66346c2e0
-Patch0: %{name}-mock.patch
-URL: https://pypi.org/project/fixtures/
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.6
-BuildRequires: python-pbr >= 0.11
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-mock
-BuildRequires: python-six
-BuildRequires: python-testrepository
-BuildRequires: python-testtools >= 0.9.22
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.3
-BuildRequires: python3-pbr >= 0.11
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-six
-BuildRequires: python3-testrepository
-BuildRequires: python3-testtools >= 0.9.22
-%endif
-%endif
-%if "%{py_ver}" >= "2.7"
-Requires: python-modules >= 1:2.7
-%else
-Requires: python-modules >= 1:2.6
-Requires: python-unittest2
-%endif
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Fixtures defines a Python contract for reusable state/support logic,
-primarily for unit testing. Helper and adaption logic is included to
-make it easy to write your own fixtures using the fixtures contract.
-Glue code is provided that makes using fixtures that meet the Fixtures
-contract in unittest compatible test cases easy and straight forward.
-
-%description -l pl.UTF-8
-Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
-wielokrotnego użytku i logiki wspierającej, służące głównie do testów
-jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
-na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
-fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
-proste tworzenie wyposażenia spełniającego kontrakt fixtures w
-przypadkach testowych zgodnych z modułem unittest.
-
-%package -n python3-fixtures
-Summary: Fixtures, reusable state for writing clean tests and more
-Summary(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.3
-
-%description -n python3-fixtures
-Fixtures defines a Python contract for reusable state/support logic,
-primarily for unit testing. Helper and adaption logic is included to
-make it easy to write your own fixtures using the fixtures contract.
-Glue code is provided that makes using fixtures that meet the Fixtures
-contract in unittest compatible test cases easy and straight forward.
-
-%description -n python3-fixtures -l pl.UTF-8
-Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
-wielokrotnego użytku i logiki wspierającej, służące głównie do testów
-jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
-na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
-fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
-proste tworzenie wyposażenia spełniającego kontrakt fixtures w
-przypadkach testowych zgodnych z modułem unittest.
-
-%prep
-%setup -q -n fixtures-%{version}
-%patch -P 0 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m testtools.run fixtures.test_suite
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-%{__python3} -m testtools.run fixtures.test_suite
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-# remove tests, keep only fixtures.tests.helpers
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests/_fixtures
-%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests/test_*.py*
-: >$RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests/__init__.py
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/fixtures/tests
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/_fixtures
-%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/test_*.py
-%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/__pycache__/test_*.py*
-: >$RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/__init__.py
-%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures
-%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
-%{py_sitescriptdir}/fixtures
-%{py_sitescriptdir}/fixtures-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-fixtures
-%defattr(644,root,root,755)
-%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README
-%{py3_sitescriptdir}/fixtures
-%{py3_sitescriptdir}/fixtures-%{version}-py*.egg-info
-%endif
diff --git a/python3-fixtures.spec b/python3-fixtures.spec
new file mode 100644
index 0000000..0083e69
--- /dev/null
+++ b/python3-fixtures.spec
@@ -0,0 +1,75 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+Summary: Fixtures, reusable state for writing clean tests and more
+Summary(pl.UTF-8): Wyposażenie testów - stan wielokrotnego użytku pozwalający na pisanie czystych testów
+Name: python3-fixtures
+Version: 4.2.5
+Release: 1
+License: Apache v2.0 or BSD
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/fixtures/
+Source0: https://files.pythonhosted.org/packages/source/f/fixtures/fixtures-%{version}.tar.gz
+# Source0-md5: eed87ce62f459e8cc3fe489d4898e495
+URL: https://pypi.org/project/fixtures/
+BuildRequires: python3-build
+BuildRequires: python3-hatch-vcs
+BuildRequires: python3-hatchling
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.8
+%if %{with tests}
+BuildRequires: python3-testtools >= 0.9.22
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+Requires: python3-modules >= 1:3.8
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Fixtures defines a Python contract for reusable state/support logic,
+primarily for unit testing. Helper and adaption logic is included to
+make it easy to write your own fixtures using the fixtures contract.
+Glue code is provided that makes using fixtures that meet the Fixtures
+contract in unittest compatible test cases easy and straight forward.
+
+%description -l pl.UTF-8
+Moduł fixtures (wyposażenie) definiuje pythonowy kontrakt dla stanu
+wielokrotnego użytku i logiki wspierającej, służące głównie do testów
+jednostkowych. Dołączona jest logika pomocnicza i adaptująca, mająca
+na celu ułatwienie pisania własnego wyposażenia przy użyciu kontraktu
+fixtures. Zapewniony jest kod sklejający, pozwalający na łatwe i
+proste tworzenie wyposażenia spełniającego kontrakt fixtures w
+przypadkach testowych zgodnych z modułem unittest.
+
+%prep
+%setup -q -n fixtures-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m testtools.run fixtures.test_suite
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/_fixtures
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/test_*.py
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/__pycache__/test_*.py*
+: >$RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures/tests/__init__.py
+%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures
+%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/fixtures
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS BSD COPYING ChangeLog GOALS NEWS README.rst
+%{py3_sitescriptdir}/fixtures
+%{py3_sitescriptdir}/fixtures-%{version}.dist-info
diff --git a/python-fixtures-mock.patch b/python-fixtures-mock.patch
deleted file mode 100644
index 2fc7bc5..0000000
--- a/python-fixtures-mock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- fixtures-2.0.0/fixtures/tests/_fixtures/test_mockpatch.py.orig 2016-03-23 23:55:38.000000000 +0100
-+++ fixtures-2.0.0/fixtures/tests/_fixtures/test_mockpatch.py 2016-05-14 14:14:25.983741571 +0200
-@@ -14,7 +14,10 @@
-
-
- import extras
--import mock # Yes, we only test the rolling backport
-+try:
-+ from unittest import mock
-+except ImportError:
-+ import mock
- import testtools
-
- from fixtures import (
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-fixtures.git/commitdiff/ec53929f3257aa025ee7f53a2ec9c9a7e2d2ae70
More information about the pld-cvs-commit
mailing list