Skip to content

Commit cd139bd

Browse files
committed
Fixes prompted by Faheem Mitha
[SVN r22631]
1 parent 17b0c81 commit cd139bd

1 file changed

Lines changed: 74 additions & 43 deletions

File tree

doc/building.html

Lines changed: 74 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ <h2><a name="building">Building Boost.Python</a></h2>
7777
library, but if multiple Boost.Python extension modules are used
7878
together, it will prevent sharing of types across extension modules, and
7979
consume extra code space. To build <code>boost_python</code>, use <a
80-
href="../../../tools/build/v1/build_system.htm">Boost.Build</a> in the usual way
81-
from the <code>libs/python/build</code> subdirectory of your boost
82-
installation (if you have already built boost from the top level this may
83-
have no effect, since the work is already done).</p>
80+
href="../../../tools/build/v1/build_system.htm">Boost.Build</a> in the
81+
usual way from the <code>libs/python/build</code> subdirectory of your
82+
boost installation (if you have already built boost from the top level
83+
this may have no effect, since the work is already done).</p>
8484

8585
<h3><a name="configuration">Basic Configuration</a></h3>
8686
You may need to configure the following variables to point Boost.Build at
@@ -266,48 +266,79 @@ <h3><a name="testing">Testing</a></h3>
266266
passes.
267267

268268
<h2><a name="building_ext">Building your Extension Module</a></h2>
269-
Though there are other approaches, the smoothest and most reliable
270-
way to build an extension module using Boost.Python is with
271-
Boost.Build. If you have to use another build system, you should
272-
use Boost.Build at least once with the
273-
"<code><b>-n</b></code>" option so you can see the command-lines it uses,
274-
and replicate them. You are likely to run into compilation or linking
275-
problems otherwise.
276-
277-
The <code><a href="../example">libs/python/example</a></code>
278-
subdirectory of your boost installation contains a small example
279-
which builds and tests two extensions. To build your own
280-
extensions copy the example subproject and make the following two edits:
281-
282-
<ol>
283-
<li><code><a
284-
href="../example/boost-build.jam"><b>boost-build.jam</b></a></code> -
285-
edit the line which reads
286-
287-
<blockquote>
269+
Though there are other approaches, the smoothest and most reliable way to
270+
build an extension module using Boost.Python is with Boost.Build. If you
271+
have to use another build system, you should use Boost.Build at least
272+
once with the "<code><b>-n</b></code>" option so you can see the
273+
command-lines it uses, and replicate them. You are likely to run into
274+
compilation or linking problems otherwise.
275+
276+
<p>The files required to build a Boost.Python extension module using bjam
277+
are the "local" files <tt>Jamfile</tt>, <tt>Jamrules</tt>, and
278+
<tt>boost_build.jam</tt>, and the <tt>boost/</tt>
279+
and <tt>tools/build/v1/</tt> subdirectories of your Boost
280+
tree. The latter directory contains the source code of the
281+
Boost.Build system, which is used to generate the correct build
282+
commands for your extension module. The '<tt>v1</tt>' refers to
283+
Boost.Build version 1. Version 2 is pre-release and currently not
284+
ready for general use.
285+
286+
<p>
287+
The <tt>libs/python/example/</tt> project we're going to build is
288+
set up to automatically rebuild the Boost.Python library in place
289+
whenever it's out-of-date rather than just reusing an existing
290+
library, so you'll also need the Boost.Python library sources in
291+
<tt>boost/python/src/</tt>.
292+
</p>
293+
294+
<blockquote>
295+
<b>Note:</b> Third-party package and distribution maintainers
296+
for various operating systems sometimes split up Boost's
297+
structure or omit parts of it, so if you didn't download an
298+
official <a href=
299+
"http://sourceforge.net/project/showfiles.php?group_id=7586">Boost
300+
release</a> you might want to <a href=
301+
"http://cvs.sourceforge.net/viewcvs.py/boost/boost/">browse our CVS
302+
structure</a> to make sure you have everything you need, and in the
303+
right places.
304+
</blockquote>
305+
306+
<p>The <code><a href="../example">libs/python/example</a></code>
307+
subdirectory of your boost installation contains a small example which
308+
builds and tests two extensions. To build your own extensions copy the
309+
example subproject and make the following two edits:</p>
310+
311+
<ol>
312+
<li>
313+
<code><a href=
314+
"../example/boost-build.jam"><b>boost-build.jam</b></a></code> - edit
315+
the line which reads
316+
317+
<blockquote>
288318
<pre>
289319
boost-build ../../../tools/build/v1 ;
290320
</pre>
291-
</blockquote>
292-
293-
so that the path refers to the <code>tools/build/v1</code> subdirectory
294-
of your Boost installation.
295-
321+
</blockquote>
322+
so that the path refers to the <code>tools/build/v1</code>
323+
subdirectory of your Boost installation.
324+
</li>
296325

297-
<li><code><a href="../example/Jamrules"><b>Jamrules</b></a></code> -
298-
edit the line which reads
326+
<li>
327+
<code><a href="../example/Jamrules"><b>Jamrules</b></a></code> - edit
328+
the line which reads
299329

300-
<blockquote>
330+
<blockquote>
301331
<pre>
302332
path-global BOOST_ROOT : ../../.. ;
303333
</pre>
304-
</blockquote>
305-
so that the path refers to the root directory of your Boost installation.
306-
</ol>
334+
</blockquote>
335+
so that the path refers to the root directory of your Boost
336+
installation.
337+
</li>
338+
</ol>
307339

308-
<p>
309-
The instructions <a href="#testing">above</a> for testing Boost.Python
310-
apply equally to your new extension modules in this subproject.
340+
<p>The instructions <a href="#testing">above</a> for testing Boost.Python
341+
apply equally to your new extension modules in this subproject.</p>
311342

312343
<h2><a name="variants">Build Variants</a></h2>
313344
Three <a href=
@@ -412,13 +443,13 @@ <h3>Using the IDE for your own projects</h3>
412443
</blockquote>
413444
<hr>
414445

415-
<p>&copy; Copyright David Abrahams 2002. Permission to copy, use, modify,
416-
sell and distribute this document is granted provided this copyright
417-
notice appears in all copies. This document is provided ``as is'' without
418-
express or implied warranty, and with no claim as to its suitability for
419-
any purpose.</p>
446+
<p>&copy; Copyright David Abrahams 2002-2004. Permission to copy,
447+
use, modify, sell and distribute this document is granted provided
448+
this copyright notice appears in all copies. This document is
449+
provided ``as is'' without express or implied warranty, and with
450+
no claim as to its suitability for any purpose.</p>
420451

421-
<p>Updated: 29 December, 2002 (David Abrahams)</p>
452+
<p>Updated: 13 April 2004 (David Abrahams)</p>
422453
</body>
423454
</html>
424455

0 commit comments

Comments
 (0)