Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-BitVector for
openSUSE:Factory checked in at 2024-12-20 15:27:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-BitVector (Old)
and /work/SRC/openSUSE:Factory/.python-BitVector.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-BitVector"
Fri Dec 20 15:27:36 2024 rev:4 rq:1232732 version:3.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-BitVector/python-BitVector.changes
2021-08-16 10:17:40.818652274 +0200
+++
/work/SRC/openSUSE:Factory/.python-BitVector.new.1881/python-BitVector.changes
2024-12-20 15:28:11.902035090 +0100
@@ -1,0 +2,8 @@
+Fri Dec 20 04:15:58 UTC 2024 - Steve Kowalik <[email protected]>
+
+- Switch to autosetup, pyproject and pyunittest macros.
+- No more greedy globs in %files.
+- Add patch no-makesuite.patch:
+ * Use the load tests protocol to run the testsuite.
+
+-------------------------------------------------------------------
New:
----
no-makesuite.patch
BETA DEBUG BEGIN:
New:- No more greedy globs in %files.
- Add patch no-makesuite.patch:
* Use the load tests protocol to run the testsuite.
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-BitVector.spec ++++++
--- /var/tmp/diff_new_pack.vxllRa/_old 2024-12-20 15:28:12.350053550 +0100
+++ /var/tmp/diff_new_pack.vxllRa/_new 2024-12-20 15:28:12.350053550 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-BitVector
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,16 +16,18 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-BitVector
Version: 3.5.0
Release: 0
Summary: A memory-efficient packed representation for bit arrays in
pure Python
License: Python-2.0
-Group: Development/Languages/Python
URL: https://engineering.purdue.edu/kak/dist/
Source:
https://files.pythonhosted.org/packages/source/B/BitVector/BitVector-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE Use load tests protocol to run the testsuite
+Patch0: no-makesuite.patch
+BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -40,19 +42,20 @@
etc.
%prep
-%setup -q -n BitVector-%{version}
+%autosetup -p1 -n BitVector-%{version}
%build
-%python_build
+%pyproject_wheel
%install
-%python_install
+%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_expand $python TestBitVector/Test.py
+%pyunittest -v TestBitVector
%files %{python_files}
%doc README
-%{python_sitelib}/*
+%{python_sitelib}/BitVector
+%{python_sitelib}/BitVector-%{version}.dist-info
++++++ no-makesuite.patch ++++++
Index: BitVector-3.5.0/TestBitVector/Test.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/Test.py
+++ BitVector-3.5.0/TestBitVector/Test.py
@@ -1,38 +1,8 @@
#!/usr/bin/env python
import unittest
-import TestBooleanLogic
-import TestConstructors
-import TestComparisonOps
-import TestPermutations
-import TestCircularShifts
+
class BitVectorTestCase( unittest.TestCase ):
def checkVersion(self):
import BitVector
-
-
-testSuites = [unittest.makeSuite(BitVectorTestCase, 'check')]
-
-for test_type in [
- TestConstructors,
- TestBooleanLogic,
- TestComparisonOps,
- TestPermutations,
- TestCircularShifts,
- ]:
- testSuites.append(test_type.getTestSuites('check'))
-
-def getTestDirectory():
- try:
- return os.path.abspath(os.path.dirname(__file__))
- except:
- return '.'
-
-import os
-
-os.chdir(getTestDirectory())
-
-runner = unittest.TextTestRunner()
-runner.run(unittest.TestSuite(testSuites))
-
Index: BitVector-3.5.0/TestBitVector/TestBooleanLogic.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/TestBooleanLogic.py
+++ BitVector-3.5.0/TestBitVector/TestBooleanLogic.py
@@ -36,8 +36,3 @@ class BooleanLogicTestCase(unittest.Test
if ( args[0].size == args[1].size ):
print(e)
print(" BOOLEAN LOGIC TEST FAILED")
-
-def getTestSuites(type):
- return unittest.TestSuite([
- unittest.makeSuite(BooleanLogicTestCase, type)
- ])
Index: BitVector-3.5.0/TestBitVector/TestCircularShifts.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/TestCircularShifts.py
+++ BitVector-3.5.0/TestBitVector/TestCircularShifts.py
@@ -24,8 +24,3 @@ class CircularShiftTestCase(unittest.Tes
except Exception as e:
print(e)
print(" CIRCULAR SHIFT TEST FAILED")
-
-def getTestSuites(type):
- return unittest.TestSuite([
- unittest.makeSuite(CircularShiftTestCase, type)
- ])
Index: BitVector-3.5.0/TestBitVector/TestComparisonOps.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/TestComparisonOps.py
+++ BitVector-3.5.0/TestBitVector/TestComparisonOps.py
@@ -39,8 +39,3 @@ class ComparisonTestCases(unittest.TestC
except Exception as e:
print(e)
print(" COMPARISON TEST FAILED")
-
-def getTestSuites(type):
- return unittest.TestSuite([
- unittest.makeSuite(ComparisonTestCases, type)
- ])
Index: BitVector-3.5.0/TestBitVector/TestConstructors.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/TestConstructors.py
+++ BitVector-3.5.0/TestBitVector/TestConstructors.py
@@ -11,7 +11,7 @@ constructorTests = [
(('intVal', '5678'), '1011000101110'),
(('bitstring', '00110011'), '00110011'),
(('streamobject', '111100001111'), '111100001111'),
- (('filename', 'testinput1.txt'),
'0100000100100000011010000111010101101110011001110111001001111001'),
+ (('filename', 'TestBitVector/testinput1.txt'),
'0100000100100000011010000111010101101110011001110111001001111001'),
]
class ConstructorTestCases(unittest.TestCase):
@@ -43,8 +43,3 @@ class ConstructorTestCases(unittest.Test
except Exception as e:
print(e)
print(" CONSTRUCTOR TEST FAILED")
-
-def getTestSuites(type):
- return unittest.TestSuite([
- unittest.makeSuite(ConstructorTestCases, type)
- ])
Index: BitVector-3.5.0/TestBitVector/TestPermutations.py
===================================================================
--- BitVector-3.5.0.orig/TestBitVector/TestPermutations.py
+++ BitVector-3.5.0/TestBitVector/TestPermutations.py
@@ -24,8 +24,3 @@ class PermutationTestCase(unittest.TestC
except Exception as e:
print(e)
print("Permutation test failed")
-
-def getTestSuites(type):
- return unittest.TestSuite([
- unittest.makeSuite(PermutationTestCase, type)
- ])
Index: BitVector-3.5.0/TestBitVector/__init__.py
===================================================================
--- /dev/null
+++ BitVector-3.5.0/TestBitVector/__init__.py
@@ -0,0 +1,19 @@
+import os
+import unittest
+
+
+def getTestDirectory():
+ try:
+ return os.path.abspath(os.path.dirname(__file__))
+ except:
+ return '.'
+
+
+def load_tests(loader, tests, pattern):
+ loader.testMethodPrefix = 'check'
+ tests.addTests(loader.discover(start_dir=getTestDirectory(),
pattern="Test*.py"))
+ return tests
+
+
+if __name__ == '__main__':
+ unittest.main()