[packages/python-whoosh] - added tests patch, pl, updated URLs

qboosh qboosh at pld-linux.org
Mon Apr 13 10:38:24 CEST 2020


commit 10061fe47cca4d64844c205d2a7853495304024f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 13 10:38:28 2020 +0200

    - added tests patch, pl, updated URLs

 python-whoosh-tests.patch | 29 ++++++++++++++++++++++++++++
 python-whoosh.spec        | 49 ++++++++++++++++++++++++++++++++---------------
 2 files changed, 63 insertions(+), 15 deletions(-)
---
diff --git a/python-whoosh.spec b/python-whoosh.spec
index 9bc48ee..fcf2a72 100644
--- a/python-whoosh.spec
+++ b/python-whoosh.spec
@@ -1,34 +1,37 @@
 #
 # Conditional build:
-%bcond_without	doc	# don't build doc
-%bcond_without	tests	# do not perform "make test"
+%bcond_without	doc	# Sphinx documentation
+%bcond_without	tests	# unit tests
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
 %define 	module	whoosh
 Summary:	Fast, pure-Python full text indexing, search, and spell checking library
+Summary(pl.UTF-8):	Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni
 Name:		python-%{module}
 Version:	2.7.4
 Release:	4
 License:	BSD
 Group:		Libraries/Python
-Source0:	https://pypi.python.org/packages/source/W/Whoosh/Whoosh-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/Whoosh/
+Source0:	https://files.pythonhosted.org/packages/source/W/Whoosh/Whoosh-%{version}.tar.gz
 # Source0-md5:	c2710105f20b3e29936bd2357383c325
-URL:		http://pythonhosted.org/Whoosh/
+Patch0:		%{name}-tests.patch
+URL:		https://pypi.org/project/Whoosh/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
-BuildRequires:	python-modules
+BuildRequires:	python-modules >= 1:2.5
 BuildRequires:	python-setuptools
 %if %{with tests}
-BuildRequires:	python3-pytest
+BuildRequires:	python3-pytest >= 3.0.0
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-modules
+BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-setuptools
 %if %{with tests}
-BuildRequires:	python3-pytest
+BuildRequires:	python3-pytest >= 3.0.0
 %endif
 %endif
 %if %{with doc}
@@ -44,8 +47,16 @@ search functionality to their applications and websites. Every part of
 how Whoosh works can be extended or replaced to meet your needs
 exactly.
 
+%description -l pl.UTF-8
+Whoosh to szybka biblioteka pełnotekstowego indeksowania i
+wyszukiwania, zaimplementowana w czystym Pythonie. Programiści mogą
+łatwo używać jej do rozszerzania funkcjonalności w swoich aplikacjach
+i serwisach. Każda część funkcjonalności Whoosha może być rozszerzona
+lub podmieniona w celu dostosowania do własnych potrzeb.
+
 %package -n python3-%{module}
 Summary:	Fast, Python3 full text indexing, search, and spell checking library
+Summary(pl.UTF-8):	Szybka, czysto pythonowa biblioteka do pełnotekstowego indeksowania, wyszukiwania i sprawdzania pisowni
 Group:		Libraries/Python
 
 %description -n python3-%{module}
@@ -55,19 +66,27 @@ search functionality to their applications and websites. Every part of
 how Whoosh works can be extended or replaced to meet your needs
 exactly.
 
+%description -n python3-%{module} -l pl.UTF-8
+Whoosh to szybka biblioteka pełnotekstowego indeksowania i
+wyszukiwania, zaimplementowana w czystym Pythonie. Programiści mogą
+łatwo używać jej do rozszerzania funkcjonalności w swoich aplikacjach
+i serwisach. Każda część funkcjonalności Whoosha może być rozszerzona
+lub podmieniona w celu dostosowania do własnych potrzeb.
+
 %package apidocs
-Summary:	%{module} API documentation
-Summary(pl.UTF-8):	Dokumentacja API %{module}
+Summary:	API documentation for Whoosh module
+Summary(pl.UTF-8):	Dokumentacja API modułu Whoosh
 Group:		Documentation
 
 %description apidocs
-API documentation for %{module}.
+API documentation for Whoosh module.
 
 %description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+Dokumentacja API modułu Whoosh.
 
 %prep
 %setup -q -n Whoosh-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
@@ -80,14 +99,14 @@ Dokumentacja API %{module}.
 
 %if %{with doc}
 sphinx-build-2 docs/source docs/html
-rm docs/html/.buildinfo
-rm -r docs/html/.doctrees
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %if %{with python2}
 %py_install
+
 %py_postclean
 %endif
 
@@ -117,5 +136,5 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with doc}
 %files apidocs
 %defattr(644,root,root,755)
-%doc docs/html/*
+%doc docs/html/{_static,api,releases,tech,*.html,*.js}
 %endif
diff --git a/python-whoosh-tests.patch b/python-whoosh-tests.patch
new file mode 100644
index 0000000..0e72f58
--- /dev/null
+++ b/python-whoosh-tests.patch
@@ -0,0 +1,29 @@
+--- Whoosh-2.7.4/src/whoosh/automata/fsa.py.orig	2020-04-13 09:02:27.928252783 +0200
++++ Whoosh-2.7.4/src/whoosh/automata/fsa.py	2020-04-13 09:02:37.254868923 +0200
+@@ -44,7 +44,7 @@
+             return False
+         st = self.transitions
+         ot = other.transitions
+-        if list(st) != list(ot):
++        if sorted(list(st)) != sorted(list(ot)):
+             return False
+         for key in st:
+             if st[key] != ot[key]:
+--- Whoosh-2.7.4/tests/test_reading.py.orig	2020-04-13 09:23:57.521266458 +0200
++++ Whoosh-2.7.4/tests/test_reading.py	2020-04-13 09:24:01.774576749 +0200
+@@ -1,3 +1,4 @@
++# coding=utf-8
+ from __future__ import with_statement
+ import random, threading, time
+ 
+--- Whoosh-2.7.4/setup.cfg.orig	2016-04-04 03:19:18.000000000 +0200
++++ Whoosh-2.7.4/setup.cfg	2020-04-13 09:25:13.170856629 +0200
+@@ -15,7 +15,7 @@
+ push = sdist bdist_wheel upload
+ pushdocs = build_sphinx upload_sphinx
+ 
+-[pytest]
++[tool:pytest]
+ addopts = -rs --tb=native
+ norecursedirs = .hg .tox _build tmp* env* benchmark stress
+ minversion = 2.0
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-whoosh.git/commitdiff/10061fe47cca4d64844c205d2a7853495304024f



More information about the pld-cvs-commit mailing list