]> git.cworth.org Git - notmuch/commitdiff
configure: check for pytest with python -m pytest
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>
Mon, 3 Aug 2020 15:40:55 +0000 (22:40 +0700)
committerDavid Bremner <david@tethera.net>
Sat, 8 Aug 2020 18:58:59 +0000 (15:58 -0300)
On different distro, pytest is suffixed with different patterns.

On the other hand, `python3-pytest' could be invoked correctly,
via `python3 -m pytest', the latter is used by our tests, now.

Switch to `$python -m pytest` to fix address all incompatible naming.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
configure

index 98f5f1ea8e255e98f9f03a450ea3d3d29eba6d10..0921c0cc0e69233608ac3b600a302bec8fd4c4d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -812,7 +812,7 @@ if [ $have_python3 -eq 1 ]; then
     printf "Checking for python3 pytest (>= 3.0)... "
     conf=$(mktemp)
     printf "[pytest]\nminversion=3.0\n" > $conf
-    if pytest-3 -c $conf --version >/dev/null 2>&1; then
+    if "$python" -m pytest -c $conf --version >/dev/null 2>&1; then
         printf "Yes.\n"
         have_python3_pytest=1
     else