[12] | 1 | # Copyright David Abrahams 2003. See accompanying LICENSE for terms |
---|
| 2 | # and conditions of use. |
---|
| 3 | |
---|
| 4 | # This is the top of our own project tree |
---|
| 5 | project-root ; |
---|
| 6 | |
---|
| 7 | # Declares the following targets: |
---|
| 8 | # |
---|
| 9 | # 1. an extension module called "getting_started1", which is |
---|
| 10 | # built from "getting_started1.cpp". Built by default |
---|
| 11 | # |
---|
| 12 | # 2. A test target called my-test.test which runs |
---|
| 13 | # test_getting_started1.py with the extension module above. Built |
---|
| 14 | # when out-of date, but only if invoked by name or if the global |
---|
| 15 | # "test" target is invoked. |
---|
| 16 | # |
---|
| 17 | # 3. A test target called my-test.run wihch runs the above test |
---|
| 18 | # unconditionally. Built only when invoked by name. |
---|
| 19 | # |
---|
| 20 | # To see verbose test output, add "-sPYTHON_TEST_ARGS=-v" to the bjam |
---|
| 21 | # command-line before the first target. |
---|
| 22 | # |
---|
| 23 | |
---|
| 24 | # Include definitions needed for Python modules |
---|
| 25 | import python ; |
---|
| 26 | |
---|
| 27 | # ----- getting_started1 ------- |
---|
| 28 | |
---|
| 29 | # Declare a Python extension called getting_started1 |
---|
| 30 | extension getting_started1 |
---|
| 31 | : # sources |
---|
| 32 | getting_started1.cpp |
---|
| 33 | |
---|
| 34 | # requirements and dependencies for Boost.Python extensions |
---|
| 35 | <template>@boost/libs/python/build/extension |
---|
| 36 | ; |
---|
| 37 | |
---|
| 38 | # Declare a test for the extension module |
---|
| 39 | boost-python-runtest test1 |
---|
| 40 | : # Python test driver |
---|
| 41 | test_getting_started1.py |
---|
| 42 | # extension modules to use |
---|
| 43 | <pyd>getting_started1 ; |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | # ----- getting_started2 ------- |
---|
| 48 | |
---|
| 49 | # Declare a Python extension called getting_started2 |
---|
| 50 | extension getting_started2 |
---|
| 51 | : # sources |
---|
| 52 | getting_started2.cpp |
---|
| 53 | |
---|
| 54 | # requirements and dependencies for Boost.Python extensions |
---|
| 55 | <template>@boost/libs/python/build/extension |
---|
| 56 | ; |
---|
| 57 | |
---|
| 58 | # Declare a test for the extension module |
---|
| 59 | boost-python-runtest test2 |
---|
| 60 | : # Python test driver |
---|
| 61 | test_getting_started2.py |
---|
| 62 | # extension modules to use |
---|
| 63 | <pyd>getting_started2 ; |
---|
| 64 | |
---|
| 65 | # ----- std_pair ------- |
---|
| 66 | |
---|
| 67 | # Declare a Python extension called std_pair |
---|
| 68 | extension std_pair_ext |
---|
| 69 | : # sources |
---|
| 70 | std_pair.cpp |
---|
| 71 | |
---|
| 72 | # requirements and dependencies for Boost.Python extensions |
---|
| 73 | <template>@boost/libs/python/build/extension |
---|
| 74 | ; |
---|
| 75 | |
---|
| 76 | # Declare a test for the extension module |
---|
| 77 | boost-python-runtest test3 |
---|
| 78 | : # Python test driver |
---|
| 79 | test_std_pair.py |
---|
| 80 | # extension modules to use |
---|
| 81 | <pyd>std_pair_ext ; |
---|