1 | # Copyright David Abrahams 2006. Distributed under the Boost |
---|
2 | # Software License, Version 1.0. (See accompanying |
---|
3 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
---|
4 | |
---|
5 | # Specify the path to the Boost project. If you move this project, |
---|
6 | # adjust the path to refer to the Boost root directory. |
---|
7 | use-project boost |
---|
8 | : ../../../.. ; |
---|
9 | |
---|
10 | # Set up the project-wide requirements that everything uses the |
---|
11 | # boost_python library defined in the project whose global ID is |
---|
12 | # /boost/python. |
---|
13 | project boost-python-quickstart |
---|
14 | : requirements <library>/boost/python//boost_python |
---|
15 | ; |
---|
16 | |
---|
17 | # Make the definition of the python-extension rule available |
---|
18 | import python ; |
---|
19 | |
---|
20 | # Declare a Python extension called hello. |
---|
21 | python-extension extending : extending.cpp ; |
---|
22 | |
---|
23 | # Declare an executable called embedding that embeds Python |
---|
24 | exe embedding : embedding.cpp /python//python ; |
---|
25 | |
---|
26 | import testing ; |
---|
27 | |
---|
28 | # Declare a test of the extension module |
---|
29 | testing.make-test run-pyd : extending test_extending.py : : test_ext ; |
---|
30 | |
---|
31 | # Declare a test of the embedding application |
---|
32 | testing.run embedding |
---|
33 | : # any ordinary arguments |
---|
34 | : script.py # any arguments that should be treated as relative paths |
---|
35 | : # requirements |
---|
36 | : test_embed ; # name of test |
---|
37 | |
---|
38 | # Create a "test" target that runs all the tests |
---|
39 | alias test : test_ext test_embed ; |
---|
40 | |
---|
41 | # make sure the tests don't run by default |
---|
42 | explicit test_ext test_embed test ; |
---|
43 | |
---|