<div class="gmail_quote">2009/12/21 Troy D. Straszheim <span dir="ltr">&lt;<a href="mailto:troy@resophonic.com">troy@resophonic.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


AFAIK this is the only python module built by boost and nobody has given<br>
serious thought to where it should be installed.  This is a large can of<br>
wriggly worms.  /usr/lib[64]/python2.6/boost does sounds reasonable, the<br>
important thing is that it is on the system&#39;s PYTHONPATH.  You&#39;d also<br>
need to drop an empty __init__.py into that boost directory.<br></blockquote><div><br>As I understand, the building of Python modules (extensions) is configured thanks to the boost_python_extension directive within CMakeLists.txt files. Also, it is then easy to see where such extensions are generated:<br>

 $ find . -name &#39;*.txt&#39; -exec grep -Hn &quot;boost_python_extension&quot; {} \;<br> ./libs/python/test/CMakeLists.txt:39:        boost_python_extension(${BPL_EXTENSION_MODULE} ${SRC})<br> ./libs/python/test/CMakeLists.txt:53:    boost_python_extension(${TESTNAME}_ext &quot;${TESTNAME}.cpp&quot;)<br>

 ./libs/python/test/CMakeLists.txt:139:boost_python_extension(builtin_converters_ext test_builtin_converters.cpp)<br> ./libs/python/test/CMakeLists.txt:146:#   boost_python_extension(overload_resolution test_overload_resolution.cpp)<br>

 ./libs/python/test/CMakeLists.txt:208:boost_python_extension(map_indexing_suite_ext<br> ./libs/parameter/test/CMakeLists.txt:70:          boost_python_extension(${BPL_EXTENSION_MODULE} ${SRC})<br> ./libs/parameter/test/CMakeLists.txt:84:      boost_python_extension(${TESTNAME}_ext &quot;${TESTNAME}.cpp&quot;)<br>

 ./libs/mpi/src/CMakeLists.txt:54:  boost_python_extension(mpi<br> ./tools/build/CMake/selftest_projects/pymodules/src/CMakeLists.txt:10:boost_python_extension(fooext_rel<br> ./tools/build/CMake/selftest_projects/pymodules/src/CMakeLists.txt:20:boost_python_extension(fooext_dbg<br>

 ./tools/build/CMake/selftest_projects/pymodules/src/CMakeLists.txt:30:boost_python_extension(fooext_default<br> ./tools/build/CMake/selftest_projects/pymodules/src/CMakeLists.txt:42:boost_python_extension(fooext_test_linkflags<br>

 ./tools/build/CMake/test/libs/d/src/CMakeLists.txt:55:boost_python_extension(doesntbuild<br><br>So, you are right, Troy: except for MPI, only test suites build Python extensions.<br>Following is the building directive for the MPI Python extension (in libs/mpi/src/CMakeLists.txt):<br>

  boost_python_extension(mpi<br>    python/collectives.cpp<br>    [...]<br>    python/py_timer.cpp<br><br>    DEPENDS boost_python boost_mpi<br>    SHARED_COMPILE_FLAGS &quot;-DBOOST_MPI_DYN_LINK=1 -DBOOST_MPI_PYTHON_DYN_LINK=1 -DBOOST_PYTHON_DYN_LINK=1&quot;<br>

    LINK_FLAGS ${MPI_LINK_FLAGS}<br>    LINK_LIBS ${MPI_LIBRARIES} ${PYTHON_LIBRARIES})<br><br>So, as I understand, we should explicitly link the mpi.so Python extension, not only with the MPI libraries, but also with the Boost.MPI ones (libboost_mpi.so). We would have to amend the LINK_LIBS directive with something like:<br>

    LINK_LIBS ${MPI_LIBRARIES} ${PYTHON_LIBRARIES} ${BOOST_MPI_LIBRARIES}<br><br>But I do not see any such ${BOOST_MPI_LIBRARIES} variable defined. How should we do it?<br><br>The other question is: how could we set a distinct installation path for that Python extension?<br>

We could maybe define a CMAKE_PYTEXT_INSTALL_PREFIX variable for that purpose?<br><br>Thanks in advance<br><br>Denis<br></div></div>

