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 for the latest Boost documentation.

libs/python/example/Jamfile

# Copyright David Abrahams 2003. See accompanying LICENSE for terms
# and conditions of use.

# This is the top of our own project tree
project-root ;

# Declares the following targets:
#    
#  1. an extension module called "getting_started1", which is
#     built from "getting_started1.cpp". Built by default
#
#  2. A test target called my-test.test which runs
#     test_getting_started1.py with the extension module above. Built
#     when out-of date, but only if invoked by name or if the global
#     "test" target is invoked.
#
#  3. A test target called my-test.run wihch runs the above test
#     unconditionally. Built only when invoked by name.
#
# To see verbose test output, add "-sPYTHON_TEST_ARGS=-v" to the bjam
# command-line before the first target.
#

# Include definitions needed for Python modules
import python ;

# ----- getting_started1 -------

# Declare a Python extension called getting_started1
extension getting_started1
: # sources
  getting_started1.cpp
  
  # requirements and dependencies for Boost.Python extensions
  <template>@boost/libs/python/build/extension
  ;

# Declare a test for the extension module
boost-python-runtest test1
    :  # Python test driver
    test_getting_started1.py
    # extension modules to use
    <pyd>getting_started1 ;
    

    
# ----- getting_started2 -------
    
# Declare a Python extension called getting_started2
extension getting_started2
:  # sources
   getting_started2.cpp
  
  # requirements and dependencies for Boost.Python extensions
  <template>@boost/libs/python/build/extension
  ;

# Declare a test for the extension module
boost-python-runtest test2
    :  # Python test driver
    test_getting_started2.py
    # extension modules to use
    <pyd>getting_started2 ;