diff --git a/deploy/platform/debian/test-install.sh b/deploy/platform/debian/test-install.sh index 01f5c844e8..d03c2d877f 100755 --- a/deploy/platform/debian/test-install.sh +++ b/deploy/platform/debian/test-install.sh @@ -13,7 +13,9 @@ DEBIAN_FRONTEND=noninteractive \ echo "=== Testing ===" . /usr/local/mdsplus/setup.sh -mdstcl show version +python3 -c 'import MDSplus; print(MDSplus.__version__)' || exit 42 + +mdstcl show version # MDSplus uses weird return codes [ $? -eq 1 ] || exit 42 diff --git a/deploy/platform/redhat/test-install.sh b/deploy/platform/redhat/test-install.sh index b0e11eba5c..2e8eefa6c2 100755 --- a/deploy/platform/redhat/test-install.sh +++ b/deploy/platform/redhat/test-install.sh @@ -14,7 +14,9 @@ dnf install -y "$@" || exit 1 echo "=== Testing ===" . /usr/local/mdsplus/setup.sh -mdstcl show version +python3 -c 'import MDSplus; print(MDSplus.__version__)' || exit 42 + +mdstcl show version # MDSplus uses weird return codes -[ $? -eq 1 ] || exit 42 +[ $? -eq 1 ] || exit 42 \ No newline at end of file diff --git a/rpm/envsyms.in b/rpm/envsyms.in index d50b64839d..30e215fd55 100644 --- a/rpm/envsyms.in +++ b/rpm/envsyms.in @@ -10,6 +10,7 @@ # MDS_PATH $MDSPLUS_DIR/tdi MDS_PYDEVICE_PATH $MDSPLUS_DIR/pydevices +PYTHONPATH $MDSPLUS_DIR/python >: PYTHONPATH $MDSPLUS_DIR/pydevices >: MATLABPATH $MDSPLUS_DIR/matlab <: UIDPATH $MDSPLUS_DIR/uid/%U <: diff --git a/rpm/python_module_install.sh b/rpm/python_module_install.sh index 00c17e6946..2e5fac41eb 100755 --- a/rpm/python_module_install.sh +++ b/rpm/python_module_install.sh @@ -7,21 +7,12 @@ if test "${module}" = "MDSplus"; then srcdir=${mdsplus_dir}/python if test "$(${mdsplus_dir}/rpm/python_module_remove.sh ${module} y)" = "y"; then setup_install=y - elif test -z "${MDSPLUS_SETUP_PY}"; then - echo "Set MDSPLUS_SETUP_PY=y if you wish to run setup.py install." fi else setup_install= srcdir=${mdsplus_dir}/pydevices fi -for python in python2 python3; do - if ( ${python} -c pass >/dev/null 2>&1 ); then - ${python} -m compileall -q -f ${srcdir}/${module} >/dev/null 2>&1 - if test "${setup_install}" = "y"; then - if ! ${python} ${srcdir}/${module}/setup.py -q install >/dev/null; then - echo "Could not 'setup.py install' MDSplus for ${python}" - fi - fi - fi -done +if test "${setup_install}" = "y"; then + echo "MDSPLUS_SETUP_PY has been removed, and ${mdsplus_dir}/python has been placed in the PYTHONPATH in ${mdsplus_dir}/etc/envsyms" +fi \ No newline at end of file