Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / python / example / quickstart / Jamroot
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                  <implicit-dependency>/boost//headers 
16   : usage-requirements <implicit-dependency>/boost//headers      
17     ;
18
19 # Make the definition of the python-extension rule available
20 import python ;
21
22 # Declare a Python extension called hello.
23 python-extension extending : extending.cpp ;
24
25 # Declare an executable called embedding that embeds Python
26 exe embedding : embedding.cpp /python//python ;
27
28 import testing ;
29
30 # Declare a test of the extension module
31 testing.make-test run-pyd : extending test_extending.py : : test_ext ;
32
33 # Declare a test of the embedding application
34 testing.run embedding 
35   :              # any ordinary arguments
36   : script.py    # any arguments that should be treated as relative paths
37   :              # requirements
38   : test_embed ; # name of test
39
40 # Create a "test" target that runs all the tests
41 alias test : test_ext test_embed ;
42
43 # make sure the tests don't run by default
44 explicit test_ext test_embed test ;
45