- Lowercase metadata directory name.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-BitVector?expand=0&rev=8
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
BitVector-3.5.0.tar.gz
Normal file
3
BitVector-3.5.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cac2fbccf11e325115827ed7be03e5fd62615227b0bbf3fa5a18a842a221839c
|
||||
size 161704
|
||||
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()
|
||||
38
python-BitVector.changes
Normal file
38
python-BitVector.changes
Normal file
@@ -0,0 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- Update to 3.5.0:
|
||||
* Version 3.5.0 makes the module ready for Python 3.9. The methods
|
||||
"array.fromstring" and "array.tostring" will not exist in Python 3.9.
|
||||
One additional change that I have made is that I have gone back to my
|
||||
older implementation for __add__ on account of a bug in the new
|
||||
implementation that I had incorporated in Version 3.4.9.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 1 12:55:55 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 3.4.9:
|
||||
* Version 3.4.9, in addition to implementing __iadd__, also includes a
|
||||
significantly faster implementation for __add__. For extending a given
|
||||
instance of BitVector, the implementation for __iadd__ adds bits to the
|
||||
existing instance as opposed to creating a new instance. These changes
|
||||
to the module should make it easier to solve larger problems more
|
||||
quickly with BitVector.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 10 15:46:03 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Initial version, needed by python-raet
|
||||
62
python-BitVector.spec
Normal file
62
python-BitVector.spec
Normal file
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# spec file for package python-BitVector
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
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
|
||||
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
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
With regard to the basic purpose of the module, it defines
|
||||
the BitVector class as a memory-efficient packed
|
||||
representation for bit arrays. The class comes with a large
|
||||
number of methods for using the representation in diverse
|
||||
applications such as computer security, computer vision,
|
||||
etc.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n BitVector-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pyunittest -v TestBitVector
|
||||
|
||||
%files %{python_files}
|
||||
%doc README
|
||||
%{python_sitelib}/BitVector
|
||||
%{python_sitelib}/bitvector-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user