@@ -54,7 +54,7 @@ modules or the executable containing `main()`. |
54 | 54 | [section No-Install Quickstart] |
55 | 55 |
|
56 | 56 | There is no need to “install Boost” in order to get started using |
57 | | -Boost.Python. These instructions use [@http://boost.org/build] projects, |
| 57 | +Boost.Python. These instructions use _bb_ projects, |
58 | 58 | which will build those binaries as soon as they're needed. Your |
59 | 59 | first tests may take a little longer while you wait for |
60 | 60 | Boost.Python to build, but doing things this way will save you from |
@@ -69,9 +69,9 @@ compiler options to use yourself. |
69 | 69 | build system* without first following these instructions. |
70 | 70 |
|
71 | 71 | If you want to use another system anyway, we suggest that you |
72 | | - follow these instructions, and then invoke ``bjam`` with the |
| 72 | + follow these instructions, and then invoke `bjam` with the |
73 | 73 |
|
74 | | - `-a -o`\ *filename* |
| 74 | + `-a -o`\ /filename/ |
75 | 75 |
|
76 | 76 | options to dump the build commands it executes to a file, so |
77 | 77 | you can see what your alternate build system needs to do.] |
@@ -91,19 +91,19 @@ compiler options to use yourself. |
91 | 91 | to see the output generated by the tests when they are run. |
92 | 92 | On Windows, your `bjam` invocation might look something like: |
93 | 93 | `` |
94 | | - C:\\boost_1_34_0\\...\\quickstart> bjam toolset=msvc --verbose-test test |
| 94 | + C:\\...\\quickstart> bjam toolset=msvc --verbose-test test |
95 | 95 | `` |
96 | 96 | and on Unix variants, perhaps, |
97 | 97 | `` |
98 | | - ~/boost_1_34_0/.../quickstart$ bjam toolset=gcc --verbose-test test |
| 98 | + .../quickstart$ bjam toolset=gcc --verbose-test test |
99 | 99 | `` |
100 | 100 |
|
101 | 101 | [note For the sake of concision, the rest of this guide will use |
102 | 102 | unix-style forward slashes in pathnames instead of the |
103 | 103 | backslashes with which Windows users may be more familiar. The forward |
104 | 104 | slashes should work everywhere except in |
105 | | - [@http://www.boost.org/more/getting_started/windows.html#command-prompt Command Prompt windows], |
106 | | - where you should use backslashes.] |
| 105 | + [@http://www.boost.org/more/getting_started/windows.html#command-prompt |
| 106 | + Command Prompt] windows, where you should use backslashes.] |
107 | 107 |
|
108 | 108 | If you followed this procedure successfully, you will have built an |
109 | 109 | extension module called `extending` and tested it by running a |
@@ -178,11 +178,11 @@ For example, if you moved the project from |
178 | 178 | `/home/dave/my-project`, you could change the first path in |
179 | 179 | `boost-build.jam` from |
180 | 180 | `` |
181 | | - ../../../../tools/build/v2 |
| 181 | + ../../../../tools/build/src |
182 | 182 | `` |
183 | 183 | to |
184 | 184 | `` |
185 | | - /home/dave/boost_1_34_0/tools/build/v2 |
| 185 | + /home/dave/boost_1_34_0/tools/build/src |
186 | 186 | `` |
187 | 187 | and change the first path in `Jamroot` from |
188 | 188 | `` |
@@ -212,8 +212,8 @@ tell Boost.Build about it by editing the name in `Jamroot`. |
212 | 212 |
|
213 | 213 | The name of the extension module is determined by two things: |
214 | 214 |
|
215 | | -1. the name in `Jamroot` immediately following `python-extension`, and |
216 | | -2. the name passed to ``BOOST_PYTHON_MODULE`` in `extending.cpp`. |
| 215 | +# the name in `Jamroot` immediately following `python-extension`, and |
| 216 | +# the name passed to `BOOST_PYTHON_MODULE` in `extending.cpp`. |
217 | 217 |
|
218 | 218 | To change the name of the extension module from `extending` to |
219 | 219 | `hello`, you'd edit `Jamroot`, changing |
|
235 | 235 | `` |
236 | 236 | [endsect] |
237 | 237 | [endsect] |
| 238 | +[endsect] |
238 | 239 | [section Installing Boost.Python on your System] |
239 | 240 |
|
240 | 241 | Since Boost.Python is a separately-compiled (as opposed to |
@@ -252,7 +253,7 @@ rather than all the Boost binaries. |
252 | 253 | [endsect] |
253 | 254 | [section Configuring Boost.Build] |
254 | 255 |
|
255 | | -As described in the _reference_, a file called |
| 256 | +As described in the [@http://www.boost.org/build/doc/html/bbv2/overview/configuration.html Boost.Build Reference Manual], a file called |
256 | 257 | `user-config.jam` in your home directory is used to |
257 | 258 | specify the tools and libraries available to the build system. You |
258 | 259 | may need to create or edit `user-config.jam` to tell Boost.Build |
@@ -284,59 +285,60 @@ method). If instead you are linking against separately-compiled |
284 | 285 | Boost.Python binaries, you should set up a `user-config.jam` file |
285 | 286 | with at least the minimal incantation above. |
286 | 287 |
|
287 | | -[endsect] |
288 | 288 | [section Python Configuration Parameters] |
289 | 289 |
|
290 | 290 | If you have several versions of Python installed, or Python is |
291 | 291 | installed in an unusual way, you may want to supply any or all of |
292 | 292 | the following optional parameters to `using python`. |
293 | 293 |
|
294 | | -* *version* |
| 294 | +[variablelist |
| 295 | + [[version] |
295 | 296 |
|
296 | | - the version of Python to use. Should be in Major.Minor |
| 297 | + [the version of Python to use. Should be in Major.Minor |
297 | 298 | format, for example, `2.3`. Do not include the subminor |
298 | 299 | version (i.e. *not* `2.5.1`). If you have multiple Python |
299 | 300 | versions installed, the version will usually be the only |
300 | | - configuration argument required. |
| 301 | + configuration argument required.]] |
301 | 302 |
|
302 | | -* *cmd-or-prefix* |
| 303 | + [[cmd-or-prefix] |
303 | 304 |
|
304 | | - preferably, a command that invokes a Python interpreter. |
| 305 | + [preferably, a command that invokes a Python interpreter. |
305 | 306 | Alternatively, the installation prefix for Python libraries and |
306 | 307 | header files. Only use the alternative formulation if there is |
307 | | - no appropriate Python executable available. |
| 308 | + no appropriate Python executable available.]] |
308 | 309 |
|
309 | | -* *includes* |
| 310 | + [[*includes*] |
310 | 311 |
|
311 | | - the `#include` paths for Python headers. Normally the correct |
| 312 | + [the `#include` paths for Python headers. Normally the correct |
312 | 313 | path(s) will be automatically deduced from `version` and/or |
313 | | - `cmd-or-prefix`. |
| 314 | + `cmd-or-prefix`.]] |
314 | 315 |
|
315 | | -* *libraries* |
| 316 | + [[*libraries*] |
316 | 317 |
|
317 | | - the path to Python library binaries. On MacOS/Darwin, |
| 318 | + [the path to Python library binaries. On MacOS/Darwin, |
318 | 319 | you can also pass the path of the Python framework. Normally the |
319 | 320 | correct path(s) will be automatically deduced from `version` |
320 | | - and/or `cmd-or-prefix`. |
| 321 | + and/or `cmd-or-prefix`.]] |
321 | 322 |
|
322 | | -* *condition* |
| 323 | + [[*condition*] |
323 | 324 |
|
324 | | - if specified, should be a set of Boost.Build |
| 325 | + [if specified, should be a set of Boost.Build |
325 | 326 | properties that are matched against the build configuration when |
326 | 327 | Boost.Build selects a Python configuration to use. See examples |
327 | | - below for details. |
| 328 | + below for details.]] |
328 | 329 |
|
329 | | -* *extension-suffix* |
| 330 | + [[*extension-suffix*] |
330 | 331 |
|
331 | | - A string to append to the name of extension |
| 332 | + [A string to append to the name of extension |
332 | 333 | modules before the true filename extension. You almost certainly |
333 | 334 | don't need to use this. Usually this suffix is only used when |
334 | 335 | targeting a Windows debug build of Python, and will be set |
335 | 336 | automatically for you based on the value of the |
336 | | - |python-debugging|_ feature. However, at least one Linux |
337 | | - distribution (Ubuntu Feisty Fawn) has a specially configured |
338 | | - [@https://wiki.ubuntu.com/PyDbgBuilds <python-debugging>] package |
339 | | - that claims to use such a suffix. |
| 337 | + [link building.python_debugging_builds <python-debugging>] feature. |
| 338 | + However, at least one Linux distribution (Ubuntu Feisty Fawn) has |
| 339 | + a specially configured [@https://wiki.ubuntu.com/PyDbgBuilds <python-dbg>] |
| 340 | + package that claims to use such a suffix.]] |
| 341 | + ] |
340 | 342 |
|
341 | 343 | [endsect] |
342 | 344 | [section Examples] |
@@ -381,8 +383,8 @@ significant. |
381 | 383 | `` |
382 | 384 |
|
383 | 385 | * If you have downloaded the Python sources and built both the |
384 | | - normal and the “\ `python debugging`_\ ” builds from source on |
385 | | - Windows, you might see: |
| 386 | + normal and the [link building.python_debugging_builds "python debugging"] |
| 387 | + builds from source on Windows, you might see: |
386 | 388 |
|
387 | 389 | `` |
388 | 390 | using python : 2.5 : C:\\src\\Python-2.5\\PCBuild\\python ; |
@@ -443,8 +445,8 @@ library, you'll need to think about which one to link with. The |
443 | 445 | Boost.Python binary comes in both static and dynamic flavors. Take |
444 | 446 | care to choose the right flavor for your application. [footnote |
445 | 447 | Information about how to identify the static and dynamic builds of Boost.Python on |
446 | | -[@http://boost.org/getting_started/windows.html#library-naming Windows] / |
447 | | -[@http://boost.org/getting_started/unix-variants.html#library-naming Unix variants]] |
| 448 | +[@http://boost.org/more/getting_started/windows.html#library-naming Windows] / |
| 449 | +[@http://boost.org/more/getting_started/unix-variants.html#library-naming Unix variants]] |
448 | 450 |
|
449 | 451 | [section The Dynamic Binary] |
450 | 452 |
|
@@ -475,12 +477,12 @@ The dynamic library is the safest and most-versatile choice: |
475 | 477 | It might be appropriate to use the static Boost.Python library in |
476 | 478 | any of the following cases: |
477 | 479 |
|
478 | | -* You are extending python and the types exposed in your |
| 480 | +* You are _extending_ python and the types exposed in your |
479 | 481 | dynamically-loaded extension module don't need to be used by any |
480 | 482 | other Boost.Python extension modules, and you don't care if the |
481 | 483 | core library code is duplicated among them. |
482 | 484 |
|
483 | | -* You are embedding python in your application and either: |
| 485 | +* You are _embedding_ python in your application and either: |
484 | 486 |
|
485 | 487 | * You are targeting a Unix variant OS other than MacOS or AIX, |
486 | 488 | where the dynamically-loaded extension modules can “see” the |
@@ -506,7 +508,7 @@ any of the following cases: |
506 | 508 | `wrap_python.hpp`. This restriction is actually imposed by |
507 | 509 | Python, or more properly, by Python's interaction with your |
508 | 510 | operating system. See |
509 | | - http://docs.python.org/ext/simpleExample.html for details. |
| 511 | + [@http://docs.python.org/ext/simpleExample.html] for details. |
510 | 512 |
|
511 | 513 | [endsect] |
512 | 514 | [section Python Debugging Builds] |
@@ -521,7 +523,7 @@ vice-versa.* |
521 | 523 |
|
522 | 524 | Since pre-built “python debugging” versions of the Python |
523 | 525 | executable and libraries are not supplied with most distributions |
524 | | -of Python, [#get-debug-build]_ and we didn't want to force our users |
| 526 | +of Python, [footnote On Unix and similar platforms, a debugging python and associated libraries are built by adding --with-pydebug when configuring the Python build. On Windows, the debugging version of Python is generated by the "Win32 Debug" target of the Visual Studio project in the PCBuild subdirectory of a full Python source code distribution.] and we didn't want to force our users |
525 | 527 | to build them, Boost.Build does not automatically enable python |
526 | 528 | debugging in its `debug` build variant (which is the default). |
527 | 529 | Instead there is a special build property called |
@@ -535,7 +537,7 @@ On many windows compilers, when extension modules are built with |
535 | 537 | the preprocessor symbol `_DEBUG`, Python defaults to force |
536 | 538 | linking with a special debugging version of the Python DLL. Since |
537 | 539 | that symbol is very commonly used even when Python is not present, |
538 | | -Boost.Python temporarily undefines _DEBUG when Python.h |
| 540 | +Boost.Python temporarily undefines `_DEBUG` when `Python.h` |
539 | 541 | is #included from `boost/python/detail/wrap_python.hpp` - unless |
540 | 542 | `BOOST_DEBUG_PYTHON` is defined. The upshot is that if you want |
541 | 543 | “python debugging”and you aren't using Boost.Build, you should make |
@@ -556,8 +558,9 @@ prior to 3.0.0 (with binutils-2.13.90-20030111-1), you will need to |
556 | 558 | create a MinGW-compatible version of the Python library; the one |
557 | 559 | shipped with Python will only work with a Microsoft-compatible |
558 | 560 | linker. Follow the instructions in the “Non-Microsoft” section of |
559 | | -the “Building Extensions: Tips And Tricks” chapter in [@http://www.python.org/doc/current/inst/index.html Installing Python Modules] to create `libpythonXX.a`, where `XX` |
560 | | -corresponds to the major and minor version numbers of your Python |
561 | | -installation. |
| 561 | +the “Building Extensions: Tips And Tricks” chapter in |
| 562 | +[@https://docs.python.org/2/install/index.html Installing Python Modules] |
| 563 | +to create `libpythonXX.a`, where `XX` corresponds to the major and minor |
| 564 | +version numbers of your Python installation. |
562 | 565 |
|
563 | 566 | [endsect] |