summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-02-05 15:01:39 +0100
committerDavid Seifert <soap@gentoo.org>2017-02-05 15:02:20 +0100
commit6c74c78e513232f9efec5ab11a7ed4ffde0c3c8d (patch)
treea3d4ab717655c6f4b0e7dc4cc81954ff25453e2c
parentdev-util/cmake: ppc and ppc64 stable (bug 607220). (diff)
downloadgentoo-6c74c78e.tar.gz
gentoo-6c74c78e.tar.bz2
gentoo-6c74c78e.zip
dev-python/whoosh: Specify UTF-8 encoding for tests
Gentoo-bug: 608324 Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--dev-python/whoosh/Manifest2
-rw-r--r--dev-python/whoosh/files/whoosh-2.7.4-tests-specify-utf8.patch13
-rw-r--r--dev-python/whoosh/whoosh-2.7.4.ebuild34
3 files changed, 31 insertions, 18 deletions
diff --git a/dev-python/whoosh/Manifest b/dev-python/whoosh/Manifest
index eb191d255dbd..1e6e7e8b4774 100644
--- a/dev-python/whoosh/Manifest
+++ b/dev-python/whoosh/Manifest
@@ -1,3 +1,3 @@
DIST Whoosh-2.6.0.zip 1193541 SHA256 7de7bc4d00a6d051dbb360b48eb7f3cd002373d87252fb0b284a3c9c453a7677 SHA512 e50e47ec0d1c65ad3c7d657586f5380a1be748945c1ce964305fa68b99379f0da676faef6f0ca45ef151df7be71150601162ee966f3aaf84047a20bca36f7e37 WHIRLPOOL c42e9760833db7186f3df5946f6dd071288cfccf2eaefba95520a2415ca377c49cf74307b3fa2c9e655f134b086ae637e5db06330248b4a27e12175920f3c7b8
DIST Whoosh-2.7.3.zip 1097515 SHA256 aa6db447522e208ae652c6ce063bb23cedec47f5ed630121b3debaa011fcb9c4 SHA512 3df18ed30f63aaa9f858d596919fa8a927f7203a52bdb4c584117b28bce313cbbb530cdb144e35af99763edbbc7d3f5c79680d04fa7c04efa91376ba62b6f556 WHIRLPOOL 1829fd083485367dd0751844c77e5f7e8c8edee4021b8518415ab6cd6f8db84b5f2f188d6e2128a105cfd8076d8101c1421838ac18f10cd632c64eed5828a44e
-DIST Whoosh-2.7.4.zip 1097662 SHA256 e0857375f63e9041e03fedd5b7541f97cf78917ac1b6b06c1fcc9b45375dda69 SHA512 8ea2f10152b0eb9fbf516a3faeed5a466216eb468f0e4b88d156591d5a36c5dc7d3408928bbd693de98bb0351b9c33cc62900c13ea56d3b3d989c1a4bbeba139 WHIRLPOOL 56622fc1049c2bfefdb4ec49e4784e7d751837cdd0cc379e7eb737da34a2dc0c6d3e7e85696ba0be60c3dd55f1981b6473391555d3851c82b7e816bab20db5d8
+DIST Whoosh-2.7.4.tar.gz 968741 SHA256 7ca5633dbfa9e0e0fa400d3151a8a0c4bec53bd2ecedc0a67705b17565c31a83 SHA512 7cdefdcf52b704ffe50c00718c42677e2ddfe879f81ad2d14b580b0e026cc0ebb6b9ddc99d8709eaff4eb9b83f654b042c8792821e1ed90aa85cfa6f82845074 WHIRLPOOL 2f077eb84fc89ff03babdd7adb25bf04ca03811a21f9ac987854c158fdd0b31f25d30ad59c9299a2da4b7ed982e2d292eeab781c10c9062e878ac0f8454115ed
diff --git a/dev-python/whoosh/files/whoosh-2.7.4-tests-specify-utf8.patch b/dev-python/whoosh/files/whoosh-2.7.4-tests-specify-utf8.patch
new file mode 100644
index 000000000000..94636c199a4c
--- /dev/null
+++ b/dev-python/whoosh/files/whoosh-2.7.4-tests-specify-utf8.patch
@@ -0,0 +1,13 @@
+Python 2 requires specifying the file encoding
+See also:
+https://www.python.org/dev/peps/pep-0263/
+https://bugs.gentoo.org/show_bug.cgi?id=608324
+
+--- a/tests/test_reading.py
++++ b/tests/test_reading.py
+@@ -1,3 +1,5 @@
++# -*- coding: utf-8 -*-
++
+ from __future__ import with_statement
+ import random, threading, time
+
diff --git a/dev-python/whoosh/whoosh-2.7.4.ebuild b/dev-python/whoosh/whoosh-2.7.4.ebuild
index b89e1c69636d..b580f97f13ba 100644
--- a/dev-python/whoosh/whoosh-2.7.4.ebuild
+++ b/dev-python/whoosh/whoosh-2.7.4.ebuild
@@ -2,28 +2,31 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="5"
+EAPI=6
-PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
-
-MY_PN="Whoosh"
+PYTHON_COMPAT=( python2_7 python{3_4,3_5} pypy )
inherit distutils-r1
DESCRIPTION="Fast, pure-Python full text indexing, search and spell checking library"
HOMEPAGE="https://bitbucket.org/mchaput/whoosh/wiki/Home/ https://pypi.python.org/pypi/Whoosh/"
-SRC_URI="mirror://pypi/W/${MY_PN}/${MY_PN}-${PV}.zip"
-
-DEPEND="app-arch/unzip
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+SRC_URI="mirror://pypi/W/${PN^}/${P^}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~x86"
IUSE="doc test"
-S="${WORKDIR}/${MY_PN}-${PV}"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx )
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${P^}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.7.4-tests-specify-utf8.patch
+)
python_prepare_all() {
# (backport from upstream)
@@ -37,7 +40,10 @@ python_prepare_all() {
python_compile_all() {
# https://bitbucket.org/mchaput/whoosh/issue/403/
- use doc && sphinx-build -b html -c docs/source/ docs/source/ docs/source/build/html
+ if use doc; then
+ sphinx-build -b html -c docs/source/ docs/source/ docs/source/build/html || die
+ HTML_DOCS=( docs/source/build/html/. )
+ fi
}
python_test() {
@@ -45,9 +51,3 @@ python_test() {
# tarball missing a file english-words.10.gz which when added sees all tests pass.
esetup.py test
}
-
-python_install_all() {
- local DOCS=( README.txt )
- use doc && local HTML_DOCS=( docs/source/build/html/. )
- distutils-r1_python_install_all
-}