forked from pool/python-bitarray
- Update to 3.7.1
* fix type hinting for memoryviews, see #241 * add [bit-endianness](endianness.rst) documentation * improve testing, including debug mode test for `digit_to_int()` - from version 3.7.0 * add `util.gen_primes()`, generate bitarrays in which active indices are prime numbers * improve `.buffer_info()` to return named tuple * add optional `mode` argument to `util.sum_indices()` to sum square of active indices * improve internal `_sysinfo()` to include `Py_DEBUG` * add [Dubner's conjecture](../examples/dubner.rst) (in memory of Harvey Dubner) * add [dynamically growing sieve](../examples/dyn_sieve.py) - from version 3.6.1 * add development files for statistical tests in `devel/random/` * optimize `util.sum_indices()` * fix RecursionError in `util.random_k()`, see #239 * add `devel/test_sum_indices.py` OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bitarray?expand=0&rev=78
This commit is contained in:
74
python-bitarray.spec
Normal file
74
python-bitarray.spec
Normal file
@@ -0,0 +1,74 @@
|
||||
#
|
||||
# spec file for package python-bitarray
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-bitarray
|
||||
Version: 3.7.1
|
||||
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 pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module dbm}
|
||||
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}"
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
rm devel/resize/.gitignore examples/puff/.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
|
||||
%{python_sitearch}/bitarray-%{version}.dist-info
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user