Skip to content

Commit

Permalink
Fix PyImathTest, PyImathNumpyTest, PyIexTest to work in the autotools…
Browse files Browse the repository at this point in the history
… build.

* in Makefile.am, the assignment should be TEST=
* in configure.ac, chmod the executable.
* in the .in file, use the #!@python@ directive so it works with python2 and python3.

Signed-off-by: Cary Phillips <cary@ilm.com>
  • Loading branch information
cary-ilm committed Jun 12, 2020
1 parent 248abc2 commit 6c82409
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions PyIlmBase/PyIexTest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

# check_PROGRAMS = pyIexTest
# TESTS = $(check_PROGRAMS)
TESTS = pyIexTest
1 change: 1 addition & 0 deletions PyIlmBase/PyImathNumpyTest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
# check_PROGRAMS = pyImathNumpyTest

# TESTS = $(check_PROGRAMS)
TESTS = pyImathNumpyTest
2 changes: 2 additions & 0 deletions PyIlmBase/PyImathNumpyTest/pyImathNumpyTest.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!@PYTHON@

from __future__ import print_function

import sys
Expand Down
1 change: 1 addition & 0 deletions PyIlmBase/PyImathTest/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
# check_PROGRAMS = pyImathTest

# TESTS = $(check_PROGRAMS)
TESTS = pyImathTest
2 changes: 1 addition & 1 deletion PyIlmBase/PyImathTest/pyImathTest.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!@PYTHON@

import math
import random
Expand Down
7 changes: 4 additions & 3 deletions PyIlmBase/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ PyIlmBase.pc
config/Makefile
PyIex/Makefile
PyIexTest/Makefile
PyIexTest/pyIexTest
PyImath/Makefile
PyImathTest/Makefile
PyImathTest/pyImathTest
PyImathNumpy/Makefile
PyImathNumpyTest/Makefile
PyImathNumpyTest/pyImathNumpyTest
])

AC_CONFIG_FILES([PyIexTest/pyIexTest], [chmod +x PyIexTest/pyIexTest])
AC_CONFIG_FILES([PyImathTest/pyImathTest], [chmod +x PyImathTest/pyImathTest])
AC_CONFIG_FILES([PyImathNumpyTest/pyImathNumpyTest], [chmod +x PyImathNumpyTest/pyImathNumpyTest])

AC_OUTPUT

AC_MSG_RESULT([
Expand Down

0 comments on commit 6c82409

Please sign in to comment.