Changeset 1ca493a
- Timestamp:
- Jun 25, 2020, 8:26:37 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- b56827
- Parents:
- 912a6f
- git-author:
- Frederik Heber <frederik.heber@…> (04/16/19 23:09:54)
- git-committer:
- Frederik Heber <frederik.heber@…> (06/25/20 20:26:37)
- Files:
-
- 1 deleted
- 6 edited
-
configure.ac (modified) (1 diff)
-
m4/ax_python.m4 (deleted)
-
m4/boost.m4 (modified) (1 diff)
-
python/Makefile.am (modified) (1 diff)
-
src/Makefile.am (modified) (2 diffs)
-
src/Python/Makefile.am (modified) (1 diff)
-
src/Python/PythonScripting.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r912a6f r1ca493a 36 36 # Python (for boost::python) 37 37 AM_PATH_PYTHON([2.2]) 38 AX_PYTHON39 38 AC_DEFINE(HAVE_PYTHON,1, ["Build python module and scripts."]) 40 39 ]) 40 python_version_major=`echo $PYTHON_VERSION | sed -e "s#\([0-9]\)\..*#\1#"` 41 41 AM_CONDITIONAL([CONDPYTHON], [test x"$enable_python" != x"no"]) 42 AS_IF([test x"$python_version_major" = x"2"],[ 43 AC_DEFINE(HAVE_PYTHON2, 1, ["using python version 2"]) 44 ],[test x"$python_version_major" = x"3"],[ 45 AC_DEFINE(HAVE_PYTHON3, 1, ["using python version 3"]) 46 ]) 42 47 AC_SUBST(HAVE_PYTHON) 43 48 -
m4/boost.m4
r912a6f r1ca493a 1122 1122 _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) 1123 1123 _BOOST_PYTHON_CONFIG([LIBS], [libs]) 1124 AC_SUBST([BOOST_PYTHON_LIB], [$BOOST_PYTHON_LIBS]) 1124 1125 m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl 1125 1126 BOOST_FIND_LIBS([python], [python python3], [$1], -
python/Makefile.am
r912a6f r1ca493a 18 18 ../src/Actions/GlobalListOfActions.hpp \ 19 19 ../src/Actions/ActionHistory.hpp 20 pyMoleCuilder_la_CPPFLAGS = $(AM_CPPFLAGS) ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} $(JobMarket_CFLAGS) -I$(PYTHON_INCLUDE_DIR) 21 pyMoleCuilder_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info $(MOLECUILDER_SO_VERSION) -shared $(BOOST_PYTHON_LDFLAGS) 20 pyMoleCuilder_la_CPPFLAGS = \ 21 $(AM_CPPFLAGS) \ 22 ${BOOST_CPPFLAGS} \ 23 ${CodePatterns_CFLAGS} \ 24 $(JobMarket_CFLAGS) \ 25 $(BOOST_PYTHON_CPPFLAGS) 26 pyMoleCuilder_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info $(MOLECUILDER_SO_VERSION) -shared $(BOOST_PYTHON_LDFLAGS) $(BOOST_PYTHON_LDFLAGS) 22 27 pyMoleCuilder_la_LIBADD = \ 23 28 $(top_builddir)/src/libMolecuilderUI.la 24 29 pyMoleCuilder_la_LIBADD += \ 25 30 $(BOOST_PYTHON_LIBS) \ 26 $ {CodePatterns_LIBS}\27 -l$(PYTHON_LIB)31 $(BOOST_PYTHON_LIB) \ 32 ${CodePatterns_LIBS} 28 33 endif 29 34 -
src/Makefile.am
r912a6f r1ca493a 323 323 Actions/Action_impl_python.hpp \ 324 324 Actions/GlobalListOfActions.hpp 325 molecuilder_CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)325 molecuilder_CPPFLAGS += $(BOOST_PYTHON_CPPFLAGS) 326 326 molecuilder_LDFLAGS += $(BOOST_PYTHON_LDFLAGS) 327 327 molecuilder_LDADD += \ 328 328 $(BOOST_PYTHON_LIBS) \ 329 $ {CodePatterns_LIBS}\330 -l$(PYTHON_LIB)329 $(BOOST_PYTHON_LIB) \ 330 ${CodePatterns_LIBS} 331 331 endif 332 332 … … 363 363 Actions/Action_impl_python.hpp \ 364 364 Actions/GlobalListOfActions.hpp 365 molecuildergui_CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)365 molecuildergui_CPPFLAGS += $(BOOST_PYTHON_CPPFLAGS) 366 366 molecuildergui_LDFLAGS += $(BOOST_PYTHON_LDFLAGS) 367 367 molecuildergui_LDADD += \ 368 368 $(BOOST_PYTHON_LIBS) \ 369 $ {CodePatterns_LIBS}\370 -l$(PYTHON_LIB)369 $(BOOST_PYTHON_LIB) \ 370 ${CodePatterns_LIBS} 371 371 endif 372 372 -
src/Python/Makefile.am
r912a6f r1ca493a 19 19 noinst_LTLIBRARIES += libMolecuilderPython.la 20 20 libMolecuilderPython_la_includedir = $(includedir)/MoleCuilder/ 21 libMolecuilderPython_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(PYTHON_INCLUDE_DIR)21 libMolecuilderPython_la_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_PYTHON_CPPFLAGS) 22 22 libMolecuilderPython_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_PYTHON_LDFLAGS) 23 23 libMolecuilderPython_la_LIBADD = \ 24 24 $(BOOST_PYTHON_LIBS) \ 25 $ {CodePatterns_LIBS}\26 -l$(PYTHON_LIB)25 $(BOOST_PYTHON_LIB) \ 26 ${CodePatterns_LIBS} 27 27 28 28 nobase_libMolecuilderPython_la_include_HEADERS = ${PYTHONHEADER} -
src/Python/PythonScripting.cpp
r912a6f r1ca493a 54 54 { 55 55 try { 56 #ifdef HAVE_PYTHON2 56 57 PyImport_AppendInittab( "pyMoleCuilder", &initpyMoleCuilder ); 58 #else 59 PyImport_AppendInittab( "pyMoleCuilder", &PyInit_pyMoleCuilder ); 60 #endif 57 61 58 62 Py_Initialize(); … … 66 70 main_namespace["pyMoleCuilder"] = molecuilder_module; 67 71 68 std::string enveloped_script("print \"BEGIN of "+python_scripttitle+":\"\n");72 std::string enveloped_script("print(\"BEGIN of "+python_scripttitle+":\")\n"); 69 73 enveloped_script += python_string+std::string("\n"); 70 enveloped_script += std::string("print \"END of "+python_scripttitle+":\"\n");74 enveloped_script += std::string("print(\"END of "+python_scripttitle+":\")\n"); 71 75 72 76 boost::python::handle<> ignored(( PyRun_String( enveloped_script.c_str(),
Note:
See TracChangeset
for help on using the changeset viewer.
