14
0
Files
python-bitarray/python-bitarray.spec

72 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-bitarray
#
# Copyright (c) 2022 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
Accepting request 1005512 from home:yarunachalam:branches:devel:languages:python - Update to 2.6.0: * add data descriptions: `.nbytes`, `.padbits`, `.readonly` * allow optional `endian` argument to be `None` when creating bitarrays * fix type annotation for `canonical_decode()`, #178 * frozenbitarray's padbits are now guaranteed to be zero * add tests - Update to 2.5.1: * optimize `.reverse()`, see #177 * allow negative (byte) indices in `.bytereverse()` - Update to 2.5.0: * add calculating of canonical Huffman codes `util.canonical_huffman()` and decoding thereof `util.canonical_decode()`, see #173 * allow creating "Huffman codes" from frequency maps with a single symbol in `util.huffman_code()` and `util.canonical_huffman()`, see #172 * allow bytes-like argument in `.frombytes()` and `.pack()` - previously, the arguments were limited to the `bytes` object, see #174 * allow bytes-like arguments in `util.deserialize()` * add official [pyodide](https://pyodide.org/) support * add [DEFLATE decompression](../examples/puff/) example * optimize `.bytereverse()` * optimize `delslice()` for cases like `del a[1:17:2]` when `a` is large * fix `examples/huffman/compress.py` to handle files with 0 or 1 characters, see also #172 * add `skipIF` decorator for skipping tests * add tests - Update to 2.4.1: * improve `resize()`, see #167 * optimize `copy_n()` by avoiding loops, #171 * `.bytereverse()` no longer sets unused pad bits to zero OBS-URL: https://build.opensuse.org/request/show/1005512 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bitarray?expand=0&rev=21
2022-09-23 05:23:53 +00:00
Version: 2.6.0
Release: 0
Summary: Efficient Arrays of Booleans
License: Python-2.0
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}
2021-04-11 21:49:21 +00:00
BuildRequires: %{python_module pytest}
# /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}
rm examples/growth/.gitignore
%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 CHANGE_LOG README.rst
%{python_sitearch}/bitarray*
%changelog