Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

libs/python/build/Jamfile

#  (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
#  distribute this software is granted provided this copyright notice appears
#  in all copies. This software is provided "as is" without express or implied
#  warranty, and with no claim as to its suitability for any purpose.
#
# Boost.Python library Jamfile


# declare the location of this subproject relative to the root
subproject libs/python/build ;

# bring in the rules for python
import python ;

if [ check-python-config ]
{
    
  local bpl-linkflags ;

  if $(UNIX) && ( $(OS) = AIX )
  {
      bpl-linkflags = <linkflags>"-e initlibboost_python" ;
  }

  # Enabling intrinsics (/0i) or maximize speed (/02) seem to cause
  # internal compiler errors with this toolset.
  local msvc-stlport-workarounds
    = <optimization>off "<cxxflags>-Ogty -O1 -Gs" ;
    
  local sources =
    numeric.cpp
    list.cpp
    long.cpp
    dict.cpp
    tuple.cpp
    str.cpp

    aix_init_module.cpp
    converter/from_python.cpp
    converter/registry.cpp
    converter/type_id.cpp
    object/enum.cpp
    object/class.cpp
    object/function.cpp
    object/inheritance.cpp
    object/life_support.cpp
    object/pickle_support.cpp
    errors.cpp
    module.cpp
    converter/builtin_converters.cpp
    converter/arg_to_python_base.cpp
    object/iterator.cpp
    object_protocol.cpp
    object_operators.cpp
    ;
  
  dll boost_python
    : ../src/$(sources)
    : $(BOOST_PYTHON_V2_PROPERTIES)
      <define>BOOST_PYTHON_SOURCE
      $(bpl-linkflags)
        <msvc-stlport><release>$(msvc-stlport-workarounds)
        <darwin><*><linkflags>-bind_at_load
      ;

  template extension
    : <dll>boost_python
    : <sysinclude>../../..
    ;
  
  lib boost_python
    : # sources
      ../src/$(sources)
        
    : # requirements
      $(BOOST_PYTHON_V2_PROPERTIES)
      <define>BOOST_PYTHON_SOURCE
      <define>BOOST_STATIC_LIB
      $(bpl-linkflags)
        <msvc-stlport><release>$(msvc-stlport-workarounds)
      ;

  stage bin-stage : <dll>boost_python <lib>boost_python
    : <tag><debug>"_debug"
      <tag><debug-python>"_pydebug"
    :
        debug release
    ;

  install python lib
    : <dll>boost_python <lib>boost_python
    ;
}