14
0
forked from pool/python-Whoosh
Files
python-Whoosh/python-Whoosh.spec

103 lines
3.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-Whoosh
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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-Whoosh
Version: 2.7.5
Release: 0
Summary: Pure-Python full text indexing, search, and spell checking library
License: BSD-2-Clause
URL: https://github.com/Sygil-Dev/whoosh-reloaded
Source0: https://github.com/Sygil-Dev/whoosh-reloaded/archive/refs/tags/v%{version}.tar.gz
Source99: python-Whoosh.rpmlintrc
# PATCH-FIX-UPSTREAM NullMatcherClass-hashable.patch gh#whoosh-community/whoosh#570 mcepl@suse.com
# NullMatcherClass needs __hash__ method as well for Sphinx4 compatiblity.
Patch0: NullMatcherClass-hashable.patch
BuildRequires: %{python_module cached-property}
BuildRequires: %{python_module pip}
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
BuildRequires: python3-sphinx-jsonschema
BuildRequires: python3-sphinx_rtd_theme
Requires: python-cached-property
BuildArch: noarch
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
# SECTION the testing dependencies
BuildRequires: %{python_module pytest}
# /SECTION
%ifpython2
Provides: python-whoosh = %{version}
Obsoletes: python-whoosh < %{version}
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%endif
%python_subpackages
%description
Whoosh is a pure-Python indexing and search library. It can be used
to add search functionality to applications and websites. Every part
of how Whoosh works can be extended or replaced to meet specific
needs.
%if 0%{?suse_version} > 1500
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%package -n python-Whoosh-doc
Summary: Documentation for %{name}
Group: Documentation/Other
Provides: %{python_module Whoosh-doc = %{version}}
%description -n python-Whoosh-doc
Whoosh is a pure-Python indexing and search library. It can be used
to add search functionality to applications and websites. Every part
of how Whoosh works can be extended or replaced to meet specific
needs.
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
This package contains the documentation.
%endif
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%prep
%autosetup -p1 -n whoosh-reloaded-%{version}
# Fix CRLF->LF
sed -i -e 's/\r$//' docs/source/api/filedb/{filestore,filetables,structfile}.rst
%build
%pyproject_wheel
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF8
%pytest
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%files %{python_files}
%license LICENSE.txt
%doc README.md
%{python_sitelib}/whoosh
%{python_sitelib}/[Ww]hoosh_[Rr]eloaded-%{version}.dist-info
%if 0%{?suse_version} > 1500
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%files -n python-Whoosh-doc
%license LICENSE.txt
%endif
%doc docs/build/html
Accepting request 506212 from home:tbechtold:branches:devel:languages:python - convert to singlespec - split -doc package - use files.pythonhosted.org as Source url - update to 2.7.4: * Changed version number to 2.7.0. * Added tag 2.7.0 for changeset 8abeb09483b9 * Results.extend() didn't update the cached length. * Fixed VarBytesListColumn and FixedBytesListColumn. * Handle an empty queue exception in mpwriter. * Merging pull request with local commit. * Added test for storing tuples. * Remove caching decorator from VarBytesColumn reader. * Added test for has_deletions() after an optimization. * Try to avoid an UnboundLocalError in the DFA when MultiTerm.matcher() has an empty string. * Don't try to write a vector if the list of items is empty. * Implemented use of score_fn argument to NestedParent. * Don't cache query -> bitset, since this somehow prevents the Searcher from being collected. * Changed README docs link to point to readthedocs.org. * Change uses of dump[s]() to always use protocol 2 instead of -1 ("use latest protocol") so indices created with Python 3.x are backwards compatible. * Fix the analyzer in test_vector_unicode() to not lowercase, since this makes the test fail on some Python versions. * Actually use the split_fn passed by the user. Not sure what happened here. * Handle pickled Schema objects that don't have a _subfields attribute. * Added fix and tests for calling expand_prefix() with unicode. * Fix short code for Swedish in language aliases. * Fix missing a consecutive token during highlighting OBS-URL: https://build.opensuse.org/request/show/506212 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Whoosh?expand=0&rev=10
2017-06-26 10:03:55 +00:00
%changelog