From a4e3f899077490f3ee2d385b7327019f2ca9a905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Thu, 21 Mar 2019 00:19:40 +0100 Subject: [PATCH] build-style/python-module.sh: add do_check --- common/build-style/python-module.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/common/build-style/python-module.sh b/common/build-style/python-module.sh index d3c93de38ca..da6ed586cff 100644 --- a/common/build-style/python-module.sh +++ b/common/build-style/python-module.sh @@ -29,6 +29,24 @@ do_build() { done } +do_check() { + : ${python_versions:="2.7 $py3_ver"} + + for pyver in $python_versions; do + ln -s build-${pyver} build + if [ -z "$make_check_target" ]; then + if ! python${pyver} setup.py --help test >/dev/null 2>&1; then + msg_warn "No command 'test' defined by setup.py for python${pyver}.\n" + rm build + return 0 + fi + fi + + python${pyver} setup.py ${make_check_target:-test} ${make_check_args} + rm build + done +} + do_install() { : ${python_versions:="2.7 $py3_ver"} local pyver= pysufx=