Commit cfc99dd1 authored by Jakub Jirutka's avatar Jakub Jirutka

community/notmuch: use python3 for building and fix tests

This may also hopefully fix build on armhf...
parent 648e695f
......@@ -22,12 +22,14 @@ subpackages="
$pkgname-zsh-completion:zshcomp:noarch
$pkgname-bash-completion:bashcomp:noarch"
source="https://notmuchmail.org/releases/$pkgname-$pkgver.tar.gz
fix-tests.patch"
fix-tests.patch
fix-tests-for-python3.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
./configure \
PYTHON=python3 ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
......@@ -128,4 +130,5 @@ py3() {
}
sha512sums="989acc5eda7d2f9512741c8ae850e34c6fbbdd5fa5fa23f25a6096250d414919007c5cfda68d6f48606c0a024692e082a28cb358e6d3fc2afc0502b5bcbf5f54 notmuch-0.25.1.tar.gz
430e8f02b194b0582dfd7c66a2791a0071824e1d215993a6daf89c8d2a1ee7f73a6202136b1d890fc8920a4dc309ae976da8a8b8fc8b90e489d3c04f1592876c fix-tests.patch"
430e8f02b194b0582dfd7c66a2791a0071824e1d215993a6daf89c8d2a1ee7f73a6202136b1d890fc8920a4dc309ae976da8a8b8fc8b90e489d3c04f1592876c fix-tests.patch
a7dd888c5d08835be75986e67afcbc95c7a65c187fab5b0eb969bb36e9bbbc2d647789f106f709a38906eed51e3684a3241678ace1fc8c4b5e1cdbdd06fb6bbb fix-tests-for-python3.patch"
Fix test-lib.sh for Python 3.5+.
Since Python 3.5 json.tool does not sort JSON keys unless --sort-keys
is specified.
See https://docs.python.org/3/library/json.html#module-json.tool.
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -627,9 +627,9 @@
# The test suite forces LC_ALL=C, but this causes Python 3 to
# decode stdin as ASCII. We need to read JSON in UTF-8, so
# override Python's stdio encoding defaults.
- output=$(echo "$1" | PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -mjson.tool \
+ output=$(echo "$1" | PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -mjson.tool --sort-keys \
|| echo "$1")
- expected=$(echo "$2" | PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -mjson.tool \
+ expected=$(echo "$2" | PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -mjson.tool --sort-keys \
|| echo "$2")
shift 2
test_expect_equal "$output" "$expected" "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment