14
0
forked from pool/python-bsddb3

Accepting request 1144077 from devel:languages:python

- Add patch support-python312.patch:
  * Fix the test script to support Python 3.12.
- Use fdupes.
- Switch to autosetup macro.

OBS-URL: https://build.opensuse.org/request/show/1144077
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-bsddb3?expand=0&rev=28
This commit is contained in:
2024-02-05 21:01:22 +00:00
committed by Git OBS Bridge
3 changed files with 35 additions and 4 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Feb 5 04:35:19 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python312.patch:
* Fix the test script to support Python 3.12.
- Use fdupes.
- Switch to autosetup macro.
-------------------------------------------------------------------
Mon Jan 15 20:37:12 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -16,21 +16,21 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-bsddb3
Version: 6.2.9
Release: 0
Summary: Python interface for Berkeley DB
License: BSD-3-Clause
Group: Development/Libraries/Python
URL: http://pypi.python.org/pypi/bsddb3
#Freecode-URL: https://www.jcea.es/programacion/pybsddb.htm
Source: https://files.pythonhosted.org/packages/source/b/bsddb3/bsddb3-%{version}.tar.gz
Patch0: support-python312.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: db-devel
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-testsuite
%python_subpackages
@@ -43,7 +43,6 @@ bsddb3.db module.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%description devel
@@ -55,7 +54,7 @@ bsddb3.db module.
This package contains the development files for %{name}
%prep
%setup -q -n bsddb3-%{version}
%autosetup -p1 -n bsddb3-%{version}
sed -i "1d" Lib/bsddb/dbshelve.py # Fix non-executable bits
%build
@@ -64,6 +63,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%python_expand rm -rf %{buildroot}%{$python_sitearch}/bsddb3/tests
%check

23
support-python312.patch Normal file
View File

@@ -0,0 +1,23 @@
Index: bsddb3-6.2.9/test3.py
===================================================================
--- bsddb3-6.2.9.orig/test3.py
+++ bsddb3-6.2.9/test3.py
@@ -152,13 +152,13 @@ try : # Check in the future if this sti
# Python 2.7 and 3.2
from unittest.runner import _TextTestResult
except ImportError :
- from unittest import _TextTestResult
+ from unittest import TextTestResult
-class ImmediateTestResult(_TextTestResult):
+class ImmediateTestResult(TextTestResult):
- __super_init = _TextTestResult.__init__
- __super_startTest = _TextTestResult.startTest
- __super_printErrors = _TextTestResult.printErrors
+ __super_init = TextTestResult.__init__
+ __super_startTest = TextTestResult.startTest
+ __super_printErrors = TextTestResult.printErrors
def __init__(self, stream, descriptions, verbosity, debug=False,
count=None, progress=False):