diff --git a/cmake_support/PROMOD3.cmake b/cmake_support/PROMOD3.cmake index 4715b551fd6ba716ff4f75953809a9c4a90dbd0a..1f625e8be368d8d3d2af3231999d0b476e1035d2 100644 --- a/cmake_support/PROMOD3.cmake +++ b/cmake_support/PROMOD3.cmake @@ -163,7 +163,7 @@ endmacro() # [HEADER_OUTPUT_DIR dir] # [LINK link_cmds]) # Description: -# Define an OpenStructure module. +# Define a ProMod3 module. #------------------------------------------------------------------------------- macro(module) #----------------------------------------------------------------------------- @@ -513,9 +513,9 @@ macro(pymod) return() endif() if (_ARG_OUTPUT_DIR) - set(PYMOD_DIR "python${PYTHON_VERSION}/site-packages/promod3/${_ARG_OUTPUT_DIR}") + set(PYMOD_DIR "python${PYTHON_VERSION}/site-packages/${_ARG_OUTPUT_DIR}") else() - set(PYMOD_DIR "python${PYTHON_VERSION}/site-packages/promod3/${_ARG_PREFIX}/${_ARG_NAME}") + set(PYMOD_DIR "python${PYTHON_VERSION}/site-packages/${_ARG_PREFIX}/${_ARG_NAME}") endif() set(PYMOD_STAGE_DIR "${LIB_STAGE_PATH}/${PYMOD_DIR}") file(MAKE_DIRECTORY ${PYMOD_STAGE_DIR}) @@ -691,7 +691,8 @@ macro(promod3_unittest) if(python_path) set(python_path "${python_path}:") endif(python_path) - set(python_path "${python_path}${LIB_STAGE_PATH}/python${PYTHON_VERSION}/site-packages") + # we just add OST manually here until we find a more flexible way + set(python_path "${python_path}${LIB_STAGE_PATH}/python${PYTHON_VERSION}/site-packages:${OST_ROOT}/lib/python${PYTHON_VERSION}/site-packages") set (PY_TESTS_CMD "PYTHONPATH=${python_path} ${PYTHON_BINARY}") add_custom_target("${py_test}_run" sh -c "${PY_TESTS_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/${py_test} || echo" @@ -701,8 +702,8 @@ macro(promod3_unittest) sh -c "${PY_TESTS_CMD} ${CMAKE_CURRENT_SOURCE_DIR}/${py_test} xml || echo" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "running checks ${py_test}" VERBATIM) - add_dependencies("${py_test}_run_xml" promod3_scripts "_${_ARG_PREFIX}_${_ARG_MODULE}") - add_dependencies("${py_test}_run" promod3_scripts "_${_ARG_PREFIX}_${_ARG_MODULE}") + add_dependencies("${py_test}_run_xml" "_${_ARG_PREFIX}_${_ARG_MODULE}") + add_dependencies("${py_test}_run" "_${_ARG_PREFIX}_${_ARG_MODULE}") add_dependencies(check "${py_test}_run") add_dependencies(check_xml "${py_test}_run_xml") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e36c9cfefddecf5cb15a4acecb9ff9841827dab9..1e924ad4a69864ac46ae7e099146e5121f238733 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -14,7 +14,10 @@ set(_SPHINX_CONF_PY "${_RST_SOURCE_DIR}/conf.py") set(_SPHINX_CONF_SUBST_DICT PROMOD3_VERSION_MAJOR="${PROMOD3_VERSION_MAJOR}" PROMOD3_VERSION_MINOR="${PROMOD3_VERSION_MINOR}" PROMOD3_VERSION_PATCH="${PROMOD3_VERSION_PATCH}" - PYTHON_DOC_URL="${PYTHON_DOC_URL}") + PYTHON_DOC_URL="${PYTHON_DOC_URL}" + LIB_STAGE_PATH="${LIB_STAGE_PATH}" + PYTHON_VERSION="${PYTHON_VERSION}" + OST_ROOT="${OST_ROOT}") set(_CONF_SUBST_DICT -DINPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in -DOUT_FILE=${_SPHINX_CONF_PY}) foreach(_subst ${_SPHINX_CONF_SUBST_DICT}) list(APPEND _CONF_SUBST_DICT -D${_subst}) diff --git a/doc/conf.py.in b/doc/conf.py.in index 3d50297091bfc95f5e678b8859b9966b9c9d9503..77d7836db1bc73e5e2cead3791c2a988e999adf7 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -19,7 +19,8 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, '@LIB_STAGE_PATH@/python@PYTHON_VERSION@/site-packages') +sys.path.insert(1, '@OST_ROOT@/lib/python@PYTHON_VERSION@/site-packages') # -- General configuration ----------------------------------------------------- diff --git a/meld/CMakeLists.txt b/meld/CMakeLists.txt index 842ebb33a2830442c28afc26541875cb69e5b77c..3cc88cad64cfaaa23f6d13734893ec061262b28a 100644 --- a/meld/CMakeLists.txt +++ b/meld/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(src) add_subdirectory(pymod) add_subdirectory(data) +add_subdirectory(tests) add_subdirectory(doc) diff --git a/meld/tests/CMakeLists.txt b/meld/tests/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..d64ff2df12cc16b3230e19985c1fd7286dfbd133 --- /dev/null +++ b/meld/tests/CMakeLists.txt @@ -0,0 +1,8 @@ +set(OST_BASE_UNIT_TESTS + test_raw_modeling.py +) + +promod3_unittest(MODULE base + SOURCES "${OST_BASE_UNIT_TESTS}" + LINK ost_mol) + diff --git a/meld/tests/test_raw_modeling.py b/meld/tests/test_raw_modeling.py index a24350ffefbeee1c3c08a44f46f2a82c009be6f5..797f94a7f9b001c530258aa340133058d12bce32 100644 --- a/meld/tests/test_raw_modeling.py +++ b/meld/tests/test_raw_modeling.py @@ -1,6 +1,7 @@ -from sm.core import * -from sm.core.test import * -from sm.meld import * +import unittest +from promod3 import * +from promod3.meld import * +from ost import seq class RawModelingTests(unittest.TestCase): def testRaiseNoAttachedView(self): @@ -86,6 +87,5 @@ class RawModelingTests(unittest.TestCase): if __name__ == "__main__": - run() - - + from ost import testutils + testutils.RunTests() diff --git a/scripts/pm.in b/scripts/pm.in index de48aca86da021358c521d9a77267e61484b4ad9..24908896ab0d7748d176984fd522858d387a302a 100755 --- a/scripts/pm.in +++ b/scripts/pm.in @@ -8,7 +8,7 @@ SCRIPT_NAME=$0 BIN_DIR=$( cd `dirname "$SCRIPT_NAME"`; pwd) export PROMOD3_ROOT="$BIN_DIR/.." PROMOD3_EXEC_PATH="$PROMOD3_ROOT/libexec" -export PYTHONPATH="${PROMOD3_ROOT}/@LIBDIR@/python@PYTHON_VERSION@/site-packages/promod3:${PYTHONPATH}" +export PYTHONPATH="${PROMOD3_ROOT}/@LIBDIR@/python@PYTHON_VERSION@/site-packages:${PYTHONPATH}" export PATH="$BIN_DIR:@OST_ROOT@/bin:$PATH" export LD_LIBRARY_PATH="${PROMOD3_ROOT}/@LIBDIR@:$LD_LIBRARY_PATH" if [ -n "@QMEAN_ROOT@" ] ; then @@ -17,9 +17,9 @@ fi if [ $# == 0 ] ; then echo "usage:" - echo " promod3 <action>" + echo " pm <action>" echo "" - echo "type promod3 help to get a list of commonly used actions" + echo "type pm help to get a list of commonly used actions" exit fi @@ -36,5 +36,5 @@ fi case "$ACTION_BASENAME" in *.py ) ost "$ACTION" $@;; * ) echo "unknown action '${ACTION}'" - echo "type promod3 help to get started" ;; + echo "type pm help to get started" ;; esac