From 2a83147d90e3fede4fe77daf59968ed663143748 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 23 May 2021 18:40:40 +0300 Subject: [PATCH] tox: fix "test command found but not installed in testenv" warning Determine architecture from python instead of using sh and uname --- python/tests/auditwheels.py | 7 ++++--- python/tox.ini | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/python/tests/auditwheels.py b/python/tests/auditwheels.py index b3806404e..4f694fa26 100644 --- a/python/tests/auditwheels.py +++ b/python/tests/auditwheels.py @@ -1,13 +1,14 @@ import os -import sys +import platform import subprocess +import sys if __name__ == "__main__": - assert len(sys.argv) == 3 + assert len(sys.argv) == 2 workspacedir = sys.argv[1] - arch = sys.argv[2] + arch = platform.machine() for relpath in os.listdir(workspacedir): if relpath.startswith("deltachat"): p = os.path.join(workspacedir, relpath) diff --git a/python/tox.ini b/python/tox.ini index 67a3d5301..fe82cd198 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -27,7 +27,7 @@ deps = skipsdist = True deps = auditwheel commands = - sh -c 'python tests/auditwheels.py {toxworkdir}/wheelhouse $(uname -m)' + python tests/auditwheels.py {toxworkdir}/wheelhouse [testenv:lint] skipsdist = True