14
0

Accepting request 788090 from home:mnhauke

resurrect package python-bitarray

OBS-URL: https://build.opensuse.org/request/show/788090
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bitarray?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2020-03-25 09:11:50 +00:00
committed by Git OBS Bridge
commit 22c80627ff
5 changed files with 209 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

3
bitarray-1.2.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ff76dca321e7720e4287fcdd10924c776e9bded7efc2410214f4a8e6cda0ccec
size 61675

112
python-bitarray.changes Normal file
View File

@@ -0,0 +1,112 @@
-------------------------------------------------------------------
Tue Mar 24 18:38:34 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Run testsuite
-------------------------------------------------------------------
Sun Mar 22 16:28:34 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.2.1
* simplify markdown of readme so PyPI renders better
* make tests for bitarray.util required (instead of warning when
they cannot be imported)
- Update to version 1.2.0
* add bitarray.util module which provides useful utility functions
* deprecate `bitarray.bitdiff` in favor of `bitarray.util.count_xor`
* use markdown for documentation
* fix bug in .count() on 32bit systems in special cases when array size
is 2^29 bits or larger
* simplified tests by using bytes syntax
* update smallints and sieve example to use new utility module
* simplified mandel example to use numba
* use file context managers in tests
- Update to version 1.1.0
* add frozenbitarray object
* add optional start and stop parameters to .count() method
* add official Python 3.8 support
* optimize setrange() C-function by using memset
* fix issue #74, bitarray is hashable on Python 2
* fix issue #68, `unittest.TestCase.assert_` deprecated
* improved test suite - tests should run in about 1 second
* update documentation to use positional-only syntax in docstrings
* update readme to pass Python 3 doctest
* add utils module to examples
- Specfile cleanup
-------------------------------------------------------------------
Fri Jul 19 00:00:00 UTC 2019 - Andres Ayala <killerrex@gmail.com>
Version 1.0.1:
- fix readme to pass ``twine check``
-------------------------------------------------------------------
Mon Jul 15 00:00:00 UTC 2019 - killerrex@gmail.com
Version 1.0.0:
- fix bitarrays beings created from unicode in Python 2
- use ``PyBytes_*`` in C code, treating the Py3k function names as default,
which also removes all redefinitions of ``PyString_*``
- handle negative arguments of .index() method consistently with how
they are treated for lists
- add a few more comments to the C code
- move imports outside tests: pickle, io, etc.
- drop Python 2.5 support
-------------------------------------------------------------------
Mon May 20 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.3:
- refactor resize() - only shrink allocated memory if new size falls
lower than half the allocated size
- improve error message when trying to initialize from float or complex
-------------------------------------------------------------------
Mon Apr 29 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.2:
- fix fail to compile on Windows with VS 2015, issue #72
-------------------------------------------------------------------
Sun Apr 28 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.1:
- fix types to actually be types, #29
- check for ambiguous prefix codes when building binary tree for decoding
- remove Python level methods: encode, decode, iterdecode (in favor of
having these implemented on the C-level along with check_codedict)
- fix self tests for Python 2.5 and 2.6
- move all Huffman code related example code into examples/huffman
- add code to generate graphviz .dot file of Huffman tree to examples
-------------------------------------------------------------------
Mon Apr 22 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9:
- more efficient decode and iterdecode by using C-level binary tree
instead of a python one, #54
- added buffer protocol support for Python 3, #55
- fixed invalid pointer exceptions in pypy, #47
- made all examples Py3k compatible
- add gene sequence example
- add official Python 3.7 support
- drop Python 2.4, 3.1 and 3.2 support
-------------------------------------------------------------------
Wed May 2 10:04:07 UTC 2018 - killerrex@gmail.com
- Migrate to singlespec
-------------------------------------------------------------------
Thu Oct 24 10:59:15 UTC 2013 - speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
-------------------------------------------------------------------
Thu May 16 17:58:51 UTC 2013 - jfunk@funktronics.ca
- Rename test skip patch
-------------------------------------------------------------------
Sat May 11 00:41:15 UTC 2013 - jfunk@funktronics.ca
- Initial release

70
python-bitarray.spec Normal file
View File

@@ -0,0 +1,70 @@
#
# spec file for package python-bitarray
#
# Copyright (c) 2020 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-bitarray
Version: 1.2.1
Release: 0
Summary: Efficient Arrays of Booleans
License: Python-2.0
Group: Development/Languages/Python
URL: https://github.com/ilanschnell/bitarray
Source: https://github.com/ilanschnell/bitarray/archive/%{version}.tar.gz#/bitarray-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module dbm}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%python_subpackages
%description
This module provides an object type which efficiently represents an
array of booleans. Bitarrays are sequence types and behave very
much like usual lists. Eight bits are represented by one byte in a
contiguous block of memory. The user can select between two
representations; little-endian and big-endian.
All of the functionality is implemented in C. Methods for accessing
the machine representation are provided. This can be useful when
bit level access to binary files is required, such as portable
bitmap image files (.pbm).
Also, when dealing with compressed data which uses variable bit
length encoding, you may find this module useful.
%prep
%setup -q -n bitarray-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# tests don't run from within the source directory
%python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}; cd /tmp/; $python -c 'import bitarray; bitarray.test()'
%files %{python_files}
%license LICENSE
%doc examples AUTHORS CHANGE_LOG README.md TODO
%{python_sitearch}/bitarray*
%changelog