Commit fbdfe1ff authored by Studer Gabriel's avatar Studer Gabriel
Browse files

Merge branch 'release-3.2.0'

parents 3c0b431e 50a4df6c
......@@ -5,6 +5,18 @@
Changelog
================================================================================
Release 3.2.0
--------------------------------------------------------------------------------
* Remove outdated configuration scripts (Fedora 19 / ancient Mac)
* Construct CB atoms if only N,CA and C atoms are present in
ReconstructSidechains input structure.
* Detect Python using functionality provided by CMake instead of our own code.
You might have to adapt CMake flags when building ProMod3 to variables
specified here: https://cmake.org/cmake/help/latest/module/FindPython.html
* Several minor bug fixes, improvements, and speed-ups.
Release 3.1.1
--------------------------------------------------------------------------------
......
......@@ -24,8 +24,8 @@ include(PROMOD3)
# versioning info
set(PROMOD3_VERSION_MAJOR 3)
set(PROMOD3_VERSION_MINOR 1)
set(PROMOD3_VERSION_PATCH 1)
set(PROMOD3_VERSION_MINOR 2)
set(PROMOD3_VERSION_PATCH 0)
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_MAJOR}.${PROMOD3_VERSION_MINOR})
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_STRING}.${PROMOD3_VERSION_PATCH})
......@@ -87,21 +87,23 @@ file(MAKE_DIRECTORY ${STAGE_DIR}
setup_compiler_flags()
# Python needed before Boost
find_package(Python 3.6 REQUIRED)
find_package(Python 3.6 REQUIRED COMPONENTS Interpreter Development)
# Split version string
string(REPLACE "." ";" _python_version_list ${PYTHON_VERSION})
list(GET _python_version_list 0 PYTHON_VERSION_MAJOR)
list(GET _python_version_list 1 PYTHON_VERSION_MINOR)
string(REPLACE "." ";" _python_version_list ${Python_VERSION})
list(GET _python_version_list 0 Python_VERSION_MAJOR)
list(GET _python_version_list 1 Python_VERSION_MINOR)
# where Python modules live
set(PYTHON_MODULE_PATH "python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages/")
setup_boost()
if(NOT DISABLE_DOCUMENTATION)
find_package(Sphinx REQUIRED)
set(PYTHON_DOC_URL "https://docs.python.org/${PYTHON_VERSION}")
set(PYTHON_DOC_URL "https://docs.python.org/${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}")
# this URL should always point to the latest version of OST
set(OST_DOC_URL "https://www.openstructure.org/docs")
endif()
find_package(OPENSTRUCTURE 2.1.0 REQUIRED
find_package(OPENSTRUCTURE 2.2.0 REQUIRED
COMPONENTS io mol seq seq_alg mol_alg conop img mol_mm)
if(CMAKE_COMPILER_IS_GNUCXX)
......@@ -125,7 +127,7 @@ endif()
# This is somewhat experimental: Checking if Boost is compiled with the same
# Python version used for Promod3. The very same macro is disabled in OST so
# it may fail at some point.
#promod3_match_boost_python_version(${PYTHON_LIBRARIES})
#promod3_match_boost_python_version(${Python_LIBRARIES})
# basic environment
include_directories(${Boost_INCLUDE_DIRS}
......@@ -162,5 +164,5 @@ message(STATUS "${PROJECT_NAME} will be built with the following options:\n"
" OpenStructure (-DOST_ROOT) : ${OST_ROOT}\n"
" Compound library (-DCOMPOUND_LIB): ${occp}\n"
" Optimized (-DOPTIMIZE) : ${_OPT}\n"
" Python : ${PYTHON_BINARY}\n"
" Python : ${Python_EXECUTABLE}\n"
" Eigen3 : ${EIGEN3_INCLUDE_DIR}\n")
......@@ -27,7 +27,7 @@ macro(find_OPENSTRUCTURE OST_ROOT HEADER_NAMES PYMOD_NAME)
set(FOUND_LIB FOUND_LIB-NOTFOUND)
find_library(FOUND_LIB
NAMES ost_${LIB}
HINTS "${PYTHON_ROOT}"
HINTS "${Python_ROOT_DIR}"
PATH ${OST_ROOT}
PATH_SUFFIXES lib lib64
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH
......
#-------------------------------------------------------------------------------
# Check for Python Libraries
#
# PYTHON_IGNORE_FRAMEWORKS if set, do not check for python frameworks.
# has meaning on MacOS X only
# PYTHON_ROOT Prefix for python libraries
# PYTHON_MIN_VERSION minimal python version required
#
# When Python is found, the result is placed in the following variables:
#
# PYTHON_LIBRARIES is set to the library and linker flags used to
# link against python
# PYTHON_VERSION is set to the version of python
# PYTHON_INCLUDE_PATH is set to the path that contains Python.h
# PYTHON_BINARY is set to the path to the python executable
# PYTHON_MODULE_PATH is set as path-component where modules should live
#
# Author: Marco Biasini/ Stefan Bienert
#-------------------------------------------------------------------------------
set(PYTHON_VERSIONS 3.8 3.7 3.6 )
set(PYTHON_MIN_VERSION 3.6.0)
#-------------------------------------------------------------------------------
# check for python framework
# this macro honours the values of PYTHON_ROOT
#-------------------------------------------------------------------------------
macro(check_for_python_framework)
set(_FRAMEWORK_SEARCH_PATHS /Library/Frameworks/ /System/Library/Frameworks)
if(PYTHON_ROOT)
set(_FRAMEWORK_SEARCH_PATHS ${PYTHON_ROOT}/Library/Frameworks)
endif()
foreach(_PATH ${_FRAMEWORK_SEARCH_PATHS})
set(_FULL_FRAMEWORK_NAME "${_PATH}/Python.framework")
if(EXISTS ${_FULL_FRAMEWORK_NAME})
set(PYTHON_FRAMEWORK ON)
set(PYTHON_INCLUDE_PATH "${_FULL_FRAMEWORK_NAME}/Headers")
set(PYTHON_FRAMEWORK_PATH "${_FULL_FRAMEWORK_NAME}/Python")
endif()
endforeach()
endmacro()
macro(_find_python PYTHON_ROOT VERSION)
string(REPLACE "." "" _VERSION_NO_DOTS "${VERSION}")
if(PYTHON_ROOT)
find_library(PYTHON_LIBRARIES
NAMES "python${_VERSION_NO_DOTS}" "python${VERSION}"
"python${_VERSION_NO_DOTS}m" "python${VERSION}m"
HINTS "${PYTHON_ROOT}"
PATH_SUFFIXES lib libs
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH
)
find_path(PYTHON_INCLUDE_PATH
NAMES Python.h
HINTS "${PYTHON_ROOT}/include"
PATH_SUFFIXES include "python${_VERSION_NO_DOTS}" "python${VERSION}"
"python${_VERSION_NO_DOTS}m" "python${VERSION}m"
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH
)
else()
find_library(PYTHON_LIBRARIES
NAMES "python${_VERSION_NO_DOTS}" "python${VERSION}"
"python${_VERSION_NO_DOTS}m" "python${VERSION}m"
PATH_SUFFIXES lib
)
find_path(PYTHON_INCLUDE_PATH
NAMES Python.h
PATH_SUFFIXES include "python${_VERSION_NO_DOTS}" "python${VERSION}"
"python${_VERSION_NO_DOTS}m" "python${VERSION}m"
)
endif()
endmacro()
macro(_find_python_bin PYTHON_ROOT VERSION)
string(REPLACE "." "" _VERSION_NO_DOTS "${VERSION}")
if(PYTHON_ROOT)
find_program(PYTHON_BINARY
NAMES "python${_VERSION_NO_DOTS}" "python${VERSION}" python.exe
HINTS "${PYTHON_ROOT}"
PATH_SUFFIXES bin
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH
)
else()
find_program(PYTHON_BINARY
NAMES "python${_VERSION_NO_DOTS}" "python${VERSION}"
HINTS "${CMAKE_PREFIX_PATH}"
PATH_SUFFIXES bin
)
endif()
endmacro()
#-------------------------------------------------------------------------------
# check for python lib
#
# this macro honours the values of PYTHON_ROOT and PYTHON_VERSION
#-------------------------------------------------------------------------------
macro(check_for_python_lib)
if(PYTHON_VERSION)
_find_python("${PYTHON_ROOT}" "${PYTHON_VERSION}")
else()
foreach(_VERSION ${PYTHON_VERSIONS})
if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR
(${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION}))
_find_python("${PYTHON_ROOT}" "${_VERSION}")
if(PYTHON_LIBRARIES)
set(PYTHON_VERSION "${_VERSION}")
break()
endif()
endif()
endforeach()
endif()
# fallback to non-versioned naming scheme
if (NOT $PYTHON_LIBRARIES)
_find_python("${PYTHON_ROOT}" "")
endif()
endmacro()
macro(check_for_python_binary)
if(PYTHON_VERSION)
_find_python_bin("${PYTHON_ROOT}" "${PYTHON_VERSION}")
else()
foreach(_VERSION ${PYTHON_VERSIONS})
if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR
(${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION}))
_find_python_bin("${PYTHON_ROOT}" "${_VERSION}")
if(PYTHON_BINARY)
set(PYTHON_VERSION "${_VERSION}")
# disallow all versions except for the one we just found. This makes
# sure we don't mismatch the python binary and the libraries.
set(PYTHON_VERSIONS "${_VERSION}")
break()
endif()
endif()
endforeach()
endif()
if (NOT PYTHON_BINARY)
_find_python("${PYTHON_ROOT}" "")
endif()
endmacro()
if(NOT PYTHON_ROOT)
if(WIN32)
set(PYTHON_ROOT "${CMAKE_PREFIX_PATH}")
else()
set(PYTHON_ROOT "/usr")
endif()
endif()
if(APPLE AND NOT PYTHON_IGNORE_FRAMEWORKS)
check_for_python_framework()
endif()
# first check for python binary.
check_for_python_binary()
if(NOT PYTHON_FRAMEWORK_FOUND)
check_for_python_lib()
endif()
set(PYTHON_MODULE_PATH "python${PYTHON_VERSION}/site-packages/")
mark_as_advanced(
PYTHON_LIBRARIES
PYTHON_INCLUDE_PATH
PYTHON_VERSION
PYTHON_BINARY
PYTHON_MODULE_PATH
)
if(PYTHON_LIBRARIES)
if(PYTHON_FRAMEWORK)
set(PYTHON_LIBRARIES "${PYTHON_FRAMEWORK_PATH}"
CACHE FILEPATH "Python Libraries" FORCE)
else()
set(PYTHON_LIBRARIES "${PYTHON_LIBRARIES}"
CACHE FILEPATH "Python Libraries" FORCE)
endif()
set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_PATH}"
CACHE FILEPATH "Python Include Path" FORCE)
endif()
if (PYTHON_BINARY)
set(PYTHON_VERSION "${PYTHON_VERSION}"
CACHE STRING "Python Version" FORCE)
set(PYTHON_BINARY "${PYTHON_BINARY}"
CACHE FILEPATH "Python Binary" FORCE)
endif()
IF(PYTHON_BINARY)
EXEC_PROGRAM ("${PYTHON_BINARY}"
IF(Python_EXECUTABLE)
EXEC_PROGRAM ("${Python_EXECUTABLE}"
ARGS "-c 'import sphinx; print(sphinx.__version__)'"
OUTPUT_VARIABLE VERSION_STRING
RETURN_VALUE SPHINX_NOT_FOUND)
......@@ -9,13 +9,13 @@ IF(PYTHON_BINARY)
set(SPHINX_FOUND TRUE)
set(SPHINX_VERSION ${VERSION_STRING})
endif (SPHINX_NOT_FOUND)
ENDIF(PYTHON_BINARY)
ENDIF(Python_EXECUTABLE)
if (SPHINX_FOUND)
message(STATUS "Sphinx version: " ${SPHINX_VERSION})
else (SPHINX_FOUND)
if (Sphinx_FIND_REQUIRED)
message (FATAL_ERROR "Could not import sphinx in " ${PYTHON_BINARY}
message (FATAL_ERROR "Could not import sphinx in " ${Python_EXECUTABLE}
" make it available or disable documentation with -DDISABLE_DOCUMENTATION")
endif (Sphinx_FIND_REQUIRED)
endif (SPHINX_FOUND)
......
......@@ -70,7 +70,7 @@ endmacro(check_architecture)
#
# Set variable VAR (in parent scope) to an updated PYTHONPATH env. variable
# which includes OST and PM3 paths. This can then be used to call python scripts
# with commands such as: sh -c "PYTHONPATH=${VAR} ${PYTHON_BINARY} ..."
# with commands such as: sh -c "PYTHONPATH=${VAR} ${Python_EXECUTABLE} ..."
#-------------------------------------------------------------------------------
macro(get_python_path VAR)
set(${VAR} $ENV{PYTHONPATH})
......@@ -521,7 +521,7 @@ macro(pymod)
set(_PARENT_LIB_NAME "${_PARENT_NAME}")
endif()
target_link_libraries("_${_ARG_NAME}" ${_PARENT_LIB_NAME}
${PYTHON_LIBRARIES} ${BOOST_PYTHON_LIBRARIES})
${Python_LIBRARIES} ${BOOST_PYTHON_LIBRARIES})
set_target_properties("_${_ARG_NAME}"
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PYMOD_STAGE_DIR})
if(NOT ENABLE_STATIC)
......@@ -589,7 +589,7 @@ macro(pymod)
add_custom_target("${_ARG_NAME}_${_trans_py_source}_pymod" ALL DEPENDS ${_trans_py_file_to})
add_dependencies("${_ARG_NAME}_pymod" "${_ARG_NAME}_${_trans_py_source}_pymod")
add_dependencies("_${_ARG_NAME}" "${_ARG_NAME}_pymod")
include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${Python_INCLUDE_DIRS})
install(FILES ${_trans_py_file_to} DESTINATION "${LIB_DIR}/${PYMOD_DIR}")
if(NOT DISABLE_DOCUMENTATION)
add_doc_dependency(NAME ${_ARG_NAME} DEP "${_ARG_NAME}_${_trans_py_source}_pymod")
......@@ -641,7 +641,7 @@ macro(pymod)
copy_if_different("./" "${PYMOD_STAGE_DIR}" "${_ABS_PY_FILES}" "TARGETS"
"${_ARG_NAME}_pymod")
add_dependencies("_${_ARG_NAME}" "${_ARG_NAME}_pymod")
include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${Python_INCLUDE_DIRS})
install(FILES ${_PY_FILES} DESTINATION "${LIB_DIR}/${PYMOD_DIR}")
endif()
endif()
......@@ -798,7 +798,7 @@ macro(promod3_unittest)
message(FATAL_ERROR "Python test script does not exist: ${py_twp}")
endif()
get_python_path(python_path)
set (PY_TESTS_CMD "PYTHONPATH=${python_path} ${PYTHON_BINARY}")
set (PY_TESTS_CMD "PYTHONPATH=${python_path} ${Python_EXECUTABLE}")
add_custom_target("${py_test}_run"
sh -c "${PY_TESTS_CMD} ${py_twp}"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......@@ -863,8 +863,8 @@ endmacro(add_unit_test_data_target)
#-------------------------------------------------------------------------------
macro(promod3_find_python_module MODULE)
if(NOT PYTHON_MODULE_${MODULE})
message(STATUS "Searching for python module ${MODULE} for ${PYTHON_BINARY}")
execute_process(COMMAND ${PYTHON_BINARY} -c "import ${MODULE}"
message(STATUS "Searching for python module ${MODULE} for ${Python_EXECUTABLE}")
execute_process(COMMAND ${Python_EXECUTABLE} -c "import ${MODULE}"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE _IMPORT_ERROR)
if(_IMPORT_ERROR)
......@@ -900,9 +900,9 @@ macro(promod3_match_boost_python_version)
list(GET _BOOST_PYTHON_LIBRARY ${_LIB_INDEX} _BP_LIB_PATH)
set(_BOOST_PYTHON_LIBRARY ${_BP_LIB_PATH})
endif()
set(CMAKE_REQUIRED_FLAGS "-I${PYTHON_INCLUDE_PATH}")
set(CMAKE_REQUIRED_FLAGS "-I${Python_INCLUDE_DIRS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -I${Boost_INCLUDE_DIR}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${PYTHON_LIBRARIES}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${Python_LIBRARIES}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${_BOOST_PYTHON_LIBRARY}")
check_cxx_source_runs(
"#include <boost/python.hpp>
......@@ -1016,12 +1016,12 @@ set(_BOOST_MIN_VERSION 1.53)
macro(setup_boost)
# starting with CMake 3.11 we could use the following instead of the foreach
# find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS
# python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
# python${Python_VERSION_MAJOR}${Python_VERSION_MINOR} REQUIRED)
# set(BOOST_PYTHON_LIBRARIES ${Boost_LIBRARIES})
# see https://cmake.org/cmake/help/v3.11/module/FindBoost.html
foreach(_python_lib_name python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
python${PYTHON_VERSION_MAJOR}
foreach(_python_lib_name python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}
python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}
python${Python_VERSION_MAJOR}
python)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS ${_python_lib_name} QUIET)
if(Boost_FOUND)
......@@ -1331,7 +1331,7 @@ macro(convert_module_data)
# setup python call
set(_PY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${_ARG_SCRIPT}")
set(_PY_CMD "${PYTHON_BINARY} '${_PY_PATH}' '${_SRC_PATH}' '${_TRG_PATH}' ${_ARG_ARGS}")
set(_PY_CMD "${Python_EXECUTABLE} '${_PY_PATH}' '${_SRC_PATH}' '${_TRG_PATH}' ${_ARG_ARGS}")
# set command to run (depends on _MODULE (pymod-target), FILE and SCRIPT)
# -> here we also make sure "import promod3" is ready
......
#!/bin/sh
# This script is aware of out-of-source builds. Just call it from within the
# build directory. Does not work from top-level dir.
# Meant to work on bc2 cluster (and probably nowhere else)!
function usage_centos6
{
echo 'usage:'
echo ' bc2-conf [OPTIONS]'
echo ' If no OPTIONS given, a default OST module is loaded.'
echo ' If any OPTIONS given, they must contain one special option:'
echo ' -DOST_ROOT=<PATH TO OST/stage>, which points to a specific OST path.'
echo ' In that case, you must have all dependencies of OST loaded as modules'
echo ' before calling this function!'
echo ' Other valid options are anything that CMake accepts.'
exit 1
}
NUM_PARAMS=$#
CENTOS_RELEASE=$(lsb_release -r |awk {'print $2'})
CENTOS_MAJOR=(${CENTOS_RELEASE//./ })
PROMOD3_SRC=$(cd `dirname $0`; pwd)
# Going up one level is intentionally, please go out of source. Just create
# a directory at your repository root, prefixed 'build'. Change into it and
# call script from there.
PROMOD3_SRC=${PROMOD3_SRC}/..
if test "$CENTOS_MAJOR" == "6"; then
# configuration for the new environment
# checking to switch OST_ROOT
cmd_params=
if test "$NUM_PARAMS" -gt "0"; then
IFS=" "
for opt in $@; do
if test ${opt:0:11} == "-DOST_ROOT="; then
EBROOTOPENSTRUCTURE=$(cd ${opt:11}; pwd)
else
cmd_params="${cmd_params} ${opt}"
fi
done
else
module load OpenStructure/.1.7.0-RC-goolf-1.4.10_20170822
fi
# load required modules
module load git/1.8.5.6-goolf-1.4.10 \
CMake/2.8.12-goolf-1.4.10 \
Python/2.7.5-goolf-1.4.10 \
Eigen/3.3.1 \
Boost/1.53.0-goolf-1.4.10-Python-2.7.5
# run cmake
cmake $PROMOD3_SRC \
-DOST_ROOT=$EBROOTOPENSTRUCTURE \
-DPYTHON_ROOT=$EBROOTPYTHON \
-DEIGEN3_INCLUDE_DIR="${EBROOTEIGEN}/include" \
-DBOOST_ROOT=$EBROOTBOOST \
-DDISABLE_DOCUMENTATION=ON \
-DOPTIMIZE=1 -DENABLE_SSE=1 \
$cmd_params
else
echo 'Only the CentOS 6 version of bc2 is supported'
# TODO: update for CentOS 7
fi
## Emacs magic
# Local Variables:
# mode: shell-script
# End:
# LocalWords: SRC OST promod CMake NUM PARAMS lt fi cd dir centos bc EIGEN
# LocalWords: pwd dirname cmake DPYTHON DBOOST conf Eigen DEIGEN
#!/bin/sh
# To find out your version of Fedora, run 'cat /etc/issue'.
# This script is aware of out-of-source builds. Just call it from within the
# build directory. Does not work from top-level dir.
function usage
{
echo 'usage:'
echo ' fedora-19-conf <OST_ROOT> [OPTIONS]'
echo ' OST_ROOT is the staging directory of OST.'
echo ' Valid options are anything that CMake accepts.'
exit
}
NUM_PARAMS=$#
if [[ "$NUM_PARAMS" -lt "1" ]] ; then
echo 'You must specify the locations of OST.';
usage
fi
OST_ROOT=$(cd $1; pwd)
shift
PROMOD3_SRC=$(cd `dirname $0`; pwd)
# Going up one level is intentionally, please go out of source. Just create a
# directory at your repository root, prefixed 'build'. Change into it and call
# script from there.
PROMOD3_SRC=${PROMOD3_SRC}/..
cmake $PROMOD3_SRC -DOST_ROOT=$OST_ROOT \
-DPYTHON_ROOT=/usr \
$@
## Emacs magic
# Local Variables:
# mode: shell-script
# End:
# LocalWords: OSX MacPorts uname SRC OST promod CMake NUM PARAMS lt fi cd
# LocalWords: pwd dirname cmake DPYTHON DBOOST conf
#!/bin/sh
# For OSX we assume that all missing dependencies are built with MacPorts
# and are located in '/opt/local'.
# To find out your version of OSX, run 'uname -r'.
# This script is aware of out-of-source builds. Just call it from within the
# build directory. Does not work from top-level dir.
function usage
{
echo 'usage:'
echo ' osx-11.4.2-conf <OST_ROOT> [OPTIONS]'
echo ' OST_ROOT is the staging directory of OST.'
echo ' Valid options are anything that CMake accepts.'
exit
}
NUM_PARAMS=$#
if [[ "$NUM_PARAMS" -lt "1" ]] ; then
echo 'You must specify the locations of OST.';
usage
fi
OST_ROOT=$(cd $1; pwd)
shift
PROMOD3_SRC=$(cd `dirname $0`; pwd)
# Going up one level is intentionally, please go out of source. Just create a
# directory at your repository root, prefixed 'build'. Change into it and call
# script from there.
PROMOD3_SRC=${PROMOD3_SRC}/..
cmake $PROMOD3_SRC -DOST_ROOT=$OST_ROOT \
-DPYTHON_ROOT=/opt/local \
-DBOOST_ROOT=/opt/local \
-DPYTHON_INCLUDE_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/ \
-DPYTHON_LIBRARIES=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
$@
## Emacs magic
# Local Variables:
# mode: shell-script
# End:
# LocalWords: OSX MacPorts uname SRC OST promod CMake NUM PARAMS lt fi cd
# LocalWords: pwd dirname cmake DPYTHON DBOOST
ARG OPENSTRUCTURE_IMAGE_TAG="2.1.0-bionic"
ARG OPENSTRUCTURE_IMAGE_TAG="2.2.0-focal"
FROM registry.scicore.unibas.ch/schwede/openstructure:${OPENSTRUCTURE_IMAGE_TAG}
# ARGUMENTS
###########
ARG PROMOD_VERSION="3.1.1"
ARG PROMOD_VERSION="3.2.0"
ARG SRC_FOLDER="/usr/local/src"
......@@ -24,7 +24,6 @@ RUN cd ${SRC_FOLDER} && \
cd ${SRC_FOLDER}/promod-${PROMOD_VERSION}/build && \
# Build and install ProMod3
cmake .. -DOST_ROOT=/usr/local \
-DPYTHON_LIBRARIES=/usr/lib/x86_64-linux-gnu/libpython3.6m.so \
-DOPTIMIZE=1 \
-DENABLE_SSE=1 \
-DDISABLE_DOCUMENTATION=1 && \
......
BootStrap: docker
From: registry.scicore.unibas.ch/schwede/promod3:3.1.1-OST2.1.0-bionic
From: registry.scicore.unibas.ch/schwede/promod3:3.2.0-OST2.2.0-focal
%post
##############################################################################
# POST
......@@ -42,7 +42,7 @@ cat > $JUPYTER_PATH/kernels/ost-kernel/kernel.json <<EOF
"-m", "ipykernel",
"-f", "{connection_file}",
"--InteractiveShellApp.exec_PYTHONSTARTUP=False",
"--InteractiveShellApp.exec_files=['/usr/local/lib64/python3.6/site-packages/ost/ost_startup.py']"
"--InteractiveShellApp.exec_files=['/usr/local/lib64/python3.8/site-packages/ost/ost_startup.py']"
],
"env": {
}
......@@ -200,7 +200,7 @@ and goes to CWD. Thus this sould work as expected out of the box.
# NOTEBOOK ENV
##############################################################################
export DNG_ROOT=$OST_ROOT
export DNG_INITDIR=${DNG_ROOT}/lib64/python3.6/site-packages/ost
export DNG_INITDIR=${DNG_ROOT}/lib64/python3.8/site-packages/ost
%apprun IPython
......
......@@ -144,7 +144,7 @@ set(_SPHINX_INDEX_HTML "${_SPHINX_HTML_DIR}/index.html")
add_custom_command(OUTPUT ${_SPHINX_INDEX_HTML}
DEPENDS doc_wait_for_rst "${_SPHINX_CONF_PY}" ${_RST_DEPS}
${_DOC_MODULE_DEPS} doc_wait_for_modules
COMMAND "${PYTHON_BINARY}" -m sphinx -b html -c "${_RST_SOURCE_DIR}"
COMMAND "${Python_EXECUTABLE}" -m sphinx -b html -c "${_RST_SOURCE_DIR}"
"${_RST_SOURCE_DIR}" "${_SPHINX_HTML_DIR}")
add_custom_target(html DEPENDS ${_SPHINX_INDEX_HTML})
......@@ -156,7 +156,7 @@ set(_SPHINX_INDEX_JSON "${_SPHINX_JSON_DIR}/index.fjson")
add_custom_command(OUTPUT ${_SPHINX_INDEX_JSON}
DEPENDS doc_wait_for_rst "${_SPHINX_CONF_PY}" ${_RST_DEPS}
${_DOC_MODULE_DEPS} doc_wait_for_modules
COMMAND "${PYTHON_BINARY}" -m sphinx -b json -c "${_RST_SOURCE_DIR}"
COMMAND "${Python_EXECUTABLE}" -m sphinx -b json -c "${_RST_SOURCE_DIR}"
"${_RST_SOURCE_DIR}" "${_SPHINX_JSON_DIR}")
add_custom_target(json DEPENDS ${_SPHINX_INDEX_JSON})
......@@ -167,7 +167,7 @@ set(_SPHINX_MAN "${_SPHINX_MAN_DIR}/promod3.1")
add_custom_command(OUTPUT ${_SPHINX_MAN}
DEPENDS doc_wait_for_rst "${_SPHINX_CONF_PY}" ${_RST_DEPS}
${_DOC_MODULE_DEPS} doc_wait_for_modules
COMMAND "${PYTHON_BINARY}" -m sphinx -b man -c "${_RST_SOURCE_DIR}"
COMMAND "${Python_EXECUTABLE}" -m sphinx -b man -c "${_RST_SOURCE_DIR}"
"${_RST_SOURCE_DIR}" "${_SPHINX_MAN_DIR}")
add_custom_target(man DEPENDS ${_SPHINX_MAN})
......@@ -180,7 +180,7 @@ add_dependencies(doc man)
set(_SPHINX_LINKCHECK_DIR "${CMAKE_CURRENT_BINARY_DIR}/linkcheck")
file(MAKE_DIRECTORY ${_SPHINX_LINKCHECK_DIR})