Ticket #5239: python-tutorial.patch
File python-tutorial.patch, 3.0 KB (added by , 12 years ago) |
---|
-
libs/python/doc/tutorial/doc/tutorial.qbk
77 77 Now the first thing you'd want to do is to build the Hello World module and 78 78 try it for yourself in Python. In this section, we will outline the steps 79 79 necessary to achieve that. We will use the build tool that comes bundled 80 with every boost distribution: [* bjam].80 with every boost distribution: [*Boost.Build]. 81 81 82 [note [*Building without bjam]82 [note [*Building without Boost.Build] 83 83 84 Besides bjam, there are of course other ways to get your module built.84 Besides Boost.Build, there are of course other ways to get your module built. 85 85 What's written here should not be taken as "the one and only way". 86 There are of course other build tools apart from [^bjam].86 There are of course other build tools apart from Boost.Build. 87 87 88 Take note however that the preferred build tool for Boost.Python is bjam.88 Take note however that the preferred build tool for Boost.Python is Boost.Build. 89 89 There are so many ways to set up the build incorrectly. Experience shows 90 90 that 90% of the "I can't build Boost.Python" problems come from people 91 91 who had to use a different tool. … … 94 94 We will skip over the details. Our objective will be to simply create 95 95 the hello world module and run it in Python. For a complete reference to 96 96 building Boost.Python, check out: [@../../../building.html 97 building.html]. After this brief [' bjam] tutorial, we should have built97 building.html]. After this brief ['Boost.Build] tutorial, we should have built 98 98 the DLLs and run a python program using the extension. 99 99 100 100 The tutorial example can be found in the directory: … … 105 105 * Jamroot 106 106 107 107 The [^hello.cpp] file is our C++ hello world example. The [^Jamroot] is 108 a minimalist [' bjam] script that builds the DLLs for us. Finally,108 a minimalist ['Boost.Build] script that builds the DLLs for us. Finally, 109 109 [^hello.py] is our Python program that uses the extension in 110 110 [^hello.cpp]. 111 111 112 Before anything else, you should have the bjamexecutable in your boost112 Before anything else, you should have Boost.Build's [^bjam] executable in your boost 113 113 directory or somewhere in your path such that [^bjam] can be executed in 114 the command line. Pre-built Boost.Jam executables are available for most 115 platforms. The complete list of Bjam executables can be found 116 [@http://sourceforge.net/project/showfiles.php?group_id=7586 here]. 114 the command line. If you haven't, please follow Boost.Build's 115 [@boost:doc/html/bbv2/installation.html installation instructions]. 117 116 118 117 [h2 Let's Jam!] 119 118 __jam__ … … 125 124 The comments contained in the Jamrules file above should be sufficient 126 125 to get you going. 127 126 128 [h2 Running bjam]127 [h2 Running Boost.Build] 129 128 130 ['bjam]is run using your operating system's command line interpreter.129 Boost.Build is run using your operating system's command line interpreter. 131 130 132 131 [:Start it up.] 133 132