Package: boost1.40 Severity: wishlist Tags: patch Hi
The attached patch adds a package with the mpi Python bindings for boost and the additional Python module for mpi. I had the add an --pythonid option to the Boost build system to be able to build for different Python versions without also building different versions of the dependant libraries for each Python version. I'll send the patch to the build system upstream as well. Gaudenz -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.31-trunk-amd64 (SMP w/2 CPU cores) Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Index: debian/control =================================================================== --- debian/control (Revision 14518) +++ debian/control (Arbeitskopie) @@ -304,6 +304,22 @@ objects for collective algorithms, and the use of modern C++ library techniques to maintain maximal efficiency. +Package: libboost-mpi-python1.40.0 +Homepage: http://www.boost.org/doc/html/mpi/python.html +Architecture: any +Section: python +Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends} +Description: C++ interface to the Message Passing Interface (MPI), Pyhton Bindings + This package forms part of the Boost C++ Libraries collection. + . + The Boost.MPI library provides a C++ interface to MPI that + supports modern C++ development styles, including complete support for + user-defined data types and C++ Standard Library types, arbitrary function + objects for collective algorithms, and the use of modern C++ library + techniques to maintain maximal efficiency. + . + This package provides Python Bindings to the C++ interface. + Package: libboost-program-options1.40.0 Homepage: http://www.boost.org/libs/program_options/ Architecture: any Index: debian/patches/series =================================================================== --- debian/patches/series (Revision 14518) +++ debian/patches/series (Arbeitskopie) @@ -7,3 +7,4 @@ date_time_date_formatting_hpp.patch jam-wall-clean.patch sh4.patch +boost-build-pythonid.patch Index: debian/patches/boost-build-pythonid.patch =================================================================== --- debian/patches/boost-build-pythonid.patch (Revision 0) +++ debian/patches/boost-build-pythonid.patch (Revision 0) @@ -0,0 +1,96 @@ +Add --pythonid parameter to the build system to only add an identification +to Python libraries. The existing --buildid parameter adds an id to all +libraries and leads to uneccessary duplication of libraries if only the +Python version for the build is different. + +--- boost_1_40_0/Jamroot 2009-08-23 18:17:37.000000000 +0200 ++++ boost1.40-1.40.0/Jamroot 2009-10-21 20:06:00.223496183 +0200 +@@ -339,6 +339,12 @@ + constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ; + } + ++# Python build id (only for Python libraries) ++local python-id = [ MATCH "^--pythonid=(.*)" : [ modules.peek : ARGV ] ] ; ++if $(python-id) ++{ ++ constant PYTHON_ID : [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ; ++} + + # This rule is called by Boost.Build to determine the name of target. We use it + # to encode the build variant, compiler name and boost version in the target +--- boost_1_40_0/libs/python/build/Jamfile.v2 2007-11-25 19:38:02.000000000 +0100 ++++ boost1.40-1.40.0/libs/python/build/Jamfile.v2 2009-10-21 18:21:56.656818332 +0200 +@@ -3,6 +3,7 @@ + # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + import os ; ++import indirect ; + import modules ; + + import python ; +@@ -24,8 +25,27 @@ + + project boost/python + : source-location ../src ++ : requirements ++ -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag ++ <tag>@$(__name__).tag + ; + ++rule tag ( name : type ? : property-set ) ++{ ++ local result = $(name) ; ++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB ++ { ++ if $(name) = boost_python && $(PYTHON_ID) ++ { ++ result = $(result)-$(PYTHON_ID) ; ++ } ++ } ++ ++ # forward to the boost tagging rule ++ return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag ++ $(result) : $(type) : $(property-set) ] ; ++} ++ + rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } } + rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } } + +--- boost_1_40_0/libs/mpi/build/Jamfile.v2 2009-08-06 21:04:54.000000000 +0200 ++++ boost1.40-1.40.0/libs/mpi/build/Jamfile.v2 2009-10-21 18:22:35.870246226 +0200 +@@ -9,6 +9,7 @@ + # Andrew Lumsdaine + + import mpi ; ++import indirect ; + import python ; + + libraries = ; +@@ -18,8 +19,27 @@ + + project boost/mpi + : source-location ../src ++ : requirements ++ -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag ++ <tag>@$(__name__).tag + ; + ++rule tag ( name : type ? : property-set ) ++{ ++ local result = $(name) ; ++ if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB ++ { ++ if $(name) = boost_mpi_python && $(PYTHON_ID) ++ { ++ result = $(result)-$(PYTHON_ID) ; ++ } ++ } ++ ++ # forward to the boost tagging rule ++ return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag ++ $(result) : $(type) : $(property-set) ] ; ++} ++ + lib boost_mpi + : + broadcast.cpp Index: debian/changelog =================================================================== --- debian/changelog (Revision 14518) +++ debian/changelog (Arbeitskopie) @@ -1,3 +1,11 @@ +boost1.40 (1.40.0-3) unstable; urgency=low + + * Add new package libboost-mpi-python which contains the Python mpi + bindings. Thanks to Gaudenz Steinlin <gaud...@debian.org> for providing a + patch. + + -- Gaudenz Steinlin <gaud...@debian.org> Wed, 21 Oct 2009 20:31:24 +0200 + boost1.40 (1.40.0-2) unstable; urgency=low * rules: Index: debian/rules =================================================================== --- debian/rules (Revision 14518) +++ debian/rules (Arbeitskopie) @@ -16,19 +16,19 @@ SHLIBS_VERSION = (>= 1.40.0-1) # Boost libraries for which we want separate packages -boost_libs := date-time filesystem graph-parallel graph iostreams math mpi \ +boost_libs := date-time filesystem graph-parallel graph iostreams math mpi mpi-python \ program-options python regex serialization signals system test \ thread wave # these are special cases, where shared library has not the same name of the Boost library boost_lib_math := math_c99 math_c99f math_tr1 math_tr1f boost_lib_math_long_double := math_c99l math_tr1l -#TODO: boost_lib_mpi := mpi mpi_python boost_lib_serialization := serialization wserialization boost_lib_test := prg_exec_monitor unit_test_framework -# These are special cases for suffixes. Generally come from --buildid, so begin with a dash. +# These are special cases for suffixes. Generally come from --pythonid, so begin with a dash. boost_suffixes_python := -py24 -py25 +boost_suffixes_mpi-python := $(boost_suffixes_python) # Files that are generated by filtering a template filtered_files = \ @@ -164,8 +164,11 @@ dh_testdir $(JAM) --without-python - $(JAM) --with-python --buildid=py24 python=2.4 - $(JAM) --with-python --buildid=py25 python=2.5 + $(JAM) --with-python --with-mpi --pythonid=py24 python=2.4 + # save mpi.so (pythonid is not (yet) used for the python module) + mv stage/lib/mpi.so stage/lib/mpi-py24.so + $(JAM) --with-python --with-mpi --pythonid=py25 python=2.5 + mv stage/lib/mpi.so stage/lib/mpi-py25.so cd tools/bcp && $(JAM) cd tools/inspect/build && $(JAM) @@ -219,8 +222,8 @@ @$(call cp_debhelper,libboost-python-dev,libboost-python$(PKGVERSION)-dev) $(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --without-python - $(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --buildid=py24 python=2.4 - $(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --buildid=py25 python=2.5 + $(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --with-mpi --pythonid=py24 python=2.4 + $(JAM) --prefix=$(CURDIR)/debian/tmp/usr install --with-python --with-mpi --pythonid=py25 python=2.5 install --mode=755 -D debian/rtupdate debian/tmp/usr/share/python/runtime.d/libboost-python$(PKGVERSION)-dev.rtupdate @@ -331,6 +334,15 @@ dh_install -plibboost-mpi$(PKGVERSION)-dev dh_link -plibboost-mpi$(PKGVERSION)-dev + # package libboost-mpi-python$(SOVERSION) + dh_install -plibboost-mpi-python$(SOVERSION) + dh_install -plibboost-mpi-python$(SOVERSION) libs/mpi/build/__init__.py usr/lib/python2.4/site-packages/boost + dh_install -plibboost-mpi-python$(SOVERSION) libs/mpi/build/__init__.py usr/lib/python2.5/site-packages/boost + dh_installdirs -plibboost-mpi-python$(SOVERSION) usr/lib/python2.4/site-packages/boost + dh_installdirs -plibboost-mpi-python$(SOVERSION) usr/lib/python2.5/site-packages/boost + cp stage/lib/mpi-py24.so debian/libboost-mpi-python$(SOVERSION)/usr/lib/python2.4/site-packages/boost/mpi.so + cp stage/lib/mpi-py25.so debian/libboost-mpi-python$(SOVERSION)/usr/lib/python2.5/site-packages/boost/mpi.so + # package libboost-program-options$(SOVERSION) dh_install -plibboost-program-options$(SOVERSION) # package libboost-program-options$(PKGVERSION)-dev