%global _empty_manifest_terminate_build 0 Name: python-bloom-filter Version: 1.3.3 Release: 1 Summary: Pure Python Bloom Filter module License: MIT URL: https://github.com/hiway/python-bloom-filter Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b2/42/43d11c75b769cb4e7ca1fd756c4ac98db5144ce2e00711a25dcbe1412648/bloom_filter-1.3.3.tar.gz BuildArch: noarch %description Note: This project has gone unmaintained for a while, please use the more up-to-date project at: - https://github.com/remram44/python-bloom-filter - https://pypi.org/project/bloom-filter2/ A pure python bloom filter (low storage requirement, probabilistic set datastructure) is provided. It is known to work on CPython 2.x, CPython 3.x, Pypy and Jython. Includes mmap, in-memory and disk-seek backends. The user specifies the desired maximum number of elements and the desired maximum false positive probability, and the module calculates the rest. Usage: :: from bloom_filter import BloomFilter # instantiate BloomFilter with custom settings, # max_elements is how many elements you expect the filter to hold. # error_rate defines accuracy; You can use defaults with # `BloomFilter()` without any arguments. Following example # is same as defaults: bloom = BloomFilter(max_elements=10000, error_rate=0.1) # Test whether the bloom-filter has seen a key: assert "test-key" in bloom is False # Mark the key as seen bloom.add("test-key") # Now check again assert "test-key" in bloom is True %package -n python3-bloom-filter Summary: Pure Python Bloom Filter module Provides: python-bloom-filter BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-bloom-filter Note: This project has gone unmaintained for a while, please use the more up-to-date project at: - https://github.com/remram44/python-bloom-filter - https://pypi.org/project/bloom-filter2/ A pure python bloom filter (low storage requirement, probabilistic set datastructure) is provided. It is known to work on CPython 2.x, CPython 3.x, Pypy and Jython. Includes mmap, in-memory and disk-seek backends. The user specifies the desired maximum number of elements and the desired maximum false positive probability, and the module calculates the rest. Usage: :: from bloom_filter import BloomFilter # instantiate BloomFilter with custom settings, # max_elements is how many elements you expect the filter to hold. # error_rate defines accuracy; You can use defaults with # `BloomFilter()` without any arguments. Following example # is same as defaults: bloom = BloomFilter(max_elements=10000, error_rate=0.1) # Test whether the bloom-filter has seen a key: assert "test-key" in bloom is False # Mark the key as seen bloom.add("test-key") # Now check again assert "test-key" in bloom is True %package help Summary: Development documents and examples for bloom-filter Provides: python3-bloom-filter-doc %description help Note: This project has gone unmaintained for a while, please use the more up-to-date project at: - https://github.com/remram44/python-bloom-filter - https://pypi.org/project/bloom-filter2/ A pure python bloom filter (low storage requirement, probabilistic set datastructure) is provided. It is known to work on CPython 2.x, CPython 3.x, Pypy and Jython. Includes mmap, in-memory and disk-seek backends. The user specifies the desired maximum number of elements and the desired maximum false positive probability, and the module calculates the rest. Usage: :: from bloom_filter import BloomFilter # instantiate BloomFilter with custom settings, # max_elements is how many elements you expect the filter to hold. # error_rate defines accuracy; You can use defaults with # `BloomFilter()` without any arguments. Following example # is same as defaults: bloom = BloomFilter(max_elements=10000, error_rate=0.1) # Test whether the bloom-filter has seen a key: assert "test-key" in bloom is False # Mark the key as seen bloom.add("test-key") # Now check again assert "test-key" in bloom is True %prep %autosetup -n bloom-filter-1.3.3 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-bloom-filter -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Sun Apr 23 2023 Python_Bot - 1.3.3-1 - Package Spec generated