[packages/python3-transaction] - python-transaction.spec updated to 5.0 for python 3.8+
qboosh
qboosh at pld-linux.org
Mon May 5 22:26:35 CEST 2025
commit e43e8a2647b40bcb991cd1ac71c50c4c864c6465
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon May 5 22:24:33 2025 +0200
- python-transaction.spec updated to 5.0 for python 3.8+
python-transaction-mock.patch | 33 ----------
...on-transaction.spec => python3-transaction.spec | 74 +++++-----------------
2 files changed, 17 insertions(+), 90 deletions(-)
---
diff --git a/python-transaction.spec b/python3-transaction.spec
similarity index 56%
rename from python-transaction.spec
rename to python3-transaction.spec
index a872889..b37ce08 100644
--- a/python-transaction.spec
+++ b/python3-transaction.spec
@@ -2,40 +2,33 @@
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
%define module transaction
Summary: Generic transaction implementation for Python, mainly used by the ZODB
Summary(pl.UTF-8): Ogólna implementacja transakcji dla Pythona, używana głównie przez ZODB
-Name: python-%{module}
-Version: 3.1.0
-Release: 3
+Name: python3-%{module}
+Version: 5.0
+Release: 1
License: ZPL v2.1
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/t/transaction/%{module}-%{version}.tar.gz
-# Source0-md5: 7e66f49195e9a54cf0af3121febb38a3
-Patch0: %{name}-mock.patch
+# Source0-md5: 1b1bd8082be375f43a855eb8dd0357d7
URL: https://github.com/zopefoundation/transaction
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-mock
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-modules >= 1:3.8
BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-zope.interface
+BuildRequires: python3-zope.testrunner
%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
BuildRequires: python3-repoze.sphinx.autointerface
+BuildRequires: python3-zope.interface
BuildRequires: sphinx-pdg-3 >= 1.8
%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.8
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -47,20 +40,6 @@ It is mainly used by the ZODB.
Ten pakiet zawiera ogólną implementację transakcji dla Ptyhona. Jest
używany głównie przez ZODB.
-%package -n python3-%{module}
-Summary: Generic transaction implementation for Python, mainly used by the ZODB
-Summary(pl.UTF-8): Ogólna implementacja transakcji dla Pythona, używana głównie przez ZODB
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.5
-
-%description -n python3-%{module}
-This package contains a generic transaction implementation for Python.
-It is mainly used by the ZODB.
-
-%description -n python3-%{module} -l pl.UTF-8
-Ten pakiet zawiera ogólną implementację transakcji dla Ptyhona. Jest
-używany głównie przez ZODB.
-
%package apidocs
Summary: API documentation for Python %{module} module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
@@ -74,17 +53,16 @@ Dokumentacja API modułu Pythona %{module}.
%prep
%setup -q -n %{module}-%{version}
-%patch -P 0 -p1
%build
-%if %{with python2}
-%py_build %{?with_tests:test}
-%endif
+%py3_build
-%if %{with python3}
-%py3_build %{?with_tests:test}
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+zope-testrunner-3 --test-path=src -v
%endif
+
%if %{with doc}
PYTHONPATH=$(pwd)/src \
%{__make} -C docs html \
@@ -94,34 +72,16 @@ PYTHONPATH=$(pwd)/src \
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
-%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%{py3_sitescriptdir}/%{module}
%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files apidocs
diff --git a/python-transaction-mock.patch b/python-transaction-mock.patch
deleted file mode 100644
index a26d859..0000000
--- a/python-transaction-mock.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- transaction-3.0.1/setup.py.orig 2020-12-11 12:41:44.000000000 +0100
-+++ transaction-3.0.1/setup.py 2022-04-26 22:16:54.892747735 +0200
-@@ -25,7 +25,7 @@ def _read_file(filename):
-
- README = _read_file('README.rst') + '\n\n' + _read_file('CHANGES.rst')
-
--tests_require = ['mock']
-+tests_require = ['mock;python_version=="2.7"']
-
- setup(name='transaction',
- version=version,
---- transaction-3.1.0/src/transaction/tests/test__manager.py.orig 2023-09-25 20:29:46.755625089 +0200
-+++ transaction-3.1.0/src/transaction/tests/test__manager.py 2023-09-25 20:32:52.544618584 +0200
-@@ -13,7 +13,10 @@
- ##############################################################################
- import unittest
-
--import mock
-+try:
-+ import mock
-+except ImportError:
-+ from unittest import mock
- import zope.interface.verify
-
- from .. import interfaces
-@@ -671,7 +674,6 @@ class TransactionManagerTests(unittest.T
- # If a datamanager registers for synchonization after a
- # transaction has started, we should call newTransaction so it
- # can do necessry setup.
-- import mock
-
- from .. import TransactionManager
- manager = TransactionManager()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-transaction.git/commitdiff/e43e8a2647b40bcb991cd1ac71c50c4c864c6465
More information about the pld-cvs-commit
mailing list