Compare commits
5 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 0fd832820b | |||
| b8376aaffd | |||
| 3f12e60a56 | |||
| b1a2768194 | |||
| 0285b72ee4 |
142
no-makesuite.patch
Normal file
142
no-makesuite.patch
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
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()
|
||||||
@@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 14 05:45:25 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Support both lowercased and unnormalized metadata directory names.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 25 00:18:55 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Lowercase metadata directory name.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 20 04:15:58 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- 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.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 13 13:55:15 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Fri Aug 13 13:55:15 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-BitVector
|
# spec file for package python-BitVector
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,16 +16,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-BitVector
|
Name: python-BitVector
|
||||||
Version: 3.5.0
|
Version: 3.5.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A memory-efficient packed representation for bit arrays in pure Python
|
Summary: A memory-efficient packed representation for bit arrays in pure Python
|
||||||
License: Python-2.0
|
License: Python-2.0
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://engineering.purdue.edu/kak/dist/
|
URL: https://engineering.purdue.edu/kak/dist/
|
||||||
Source: https://files.pythonhosted.org/packages/source/B/BitVector/BitVector-%{version}.tar.gz
|
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 setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -40,20 +42,21 @@ applications such as computer security, computer vision,
|
|||||||
etc.
|
etc.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n BitVector-%{version}
|
%autosetup -p1 -n BitVector-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_expand $python TestBitVector/Test.py
|
%pyunittest -v TestBitVector
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README
|
%doc README
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/BitVector
|
||||||
|
%{python_sitelib}/[Bb]it[Vv]ector-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user