diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-11 12:55:01 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 12:55:01 +0000 |
commit | 82d936f1abaffc0e5fb8a07e02028f3626569982 (patch) | |
tree | 88bd967a60d79984461aa4602c75c9d0a746133e | |
parent | 2c4ba5172305f00473a19980c44bd2a8da6574e2 (diff) |
automatic import of python-bloom-filter
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-bloom-filter.spec | 189 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 191 insertions, 0 deletions
@@ -0,0 +1 @@ +/bloom_filter-1.3.3.tar.gz diff --git a/python-bloom-filter.spec b/python-bloom-filter.spec new file mode 100644 index 0000000..162e546 --- /dev/null +++ b/python-bloom-filter.spec @@ -0,0 +1,189 @@ +%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 +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.3-1 +- Package Spec generated @@ -0,0 +1 @@ +661086ea219a9254146322e0cb9981a5 bloom_filter-1.3.3.tar.gz |