build-style/python-module.sh: add do_check
This commit is contained in:
parent
2219c715c4
commit
a4e3f89907
1 changed files with 18 additions and 0 deletions
|
@ -29,6 +29,24 @@ do_build() {
|
||||||
done
|
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() {
|
do_install() {
|
||||||
: ${python_versions:="2.7 $py3_ver"}
|
: ${python_versions:="2.7 $py3_ver"}
|
||||||
local pyver= pysufx=
|
local pyver= pysufx=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue