• Home
  • Raw
  • Download

Lines Matching full:python

15 Boost.Python requires [@http://www.python.org/2.2 Python 2.2]
16 [footnote Note that although we tested earlier versions of Boost.Python
17 with Python 2.2, and we don't *think* we've done anything to break
18 compatibility, this release of Boost.Python may not have been tested
19 with versions of Python earlier than 2.4, so we're not 100% sure that
20 python 2.2 and 2.3 are supported.] *or* [@http://www.python.org newer].
25 There are two basic models for combining C++ and Python:
27 * [@http://www.python.org/doc/current/ext/intro.html extending],
28 in which the end-user launches the Python interpreter
29 executable and imports Python “extension modules” written in C++.
30 Think of taking a library written in C++ and giving it a Python
31 interface so Python programmers can use it. From Python, these
32 modules look just like regular Python modules.
34 * [@http://www.python.org/doc/current/ext/embedding.html embedding],
36 in C++ that in turn invokes the Python interpreter as a library
41 of the C++ `main()` function: in the Python interpreter executable,
43 embedding Python in another program, [@http://www.python.org/doc/current/ext/extending-with-embeddi…
44 the best way to make C/C++ functionality accessible to Python
57 Boost.Python. These instructions use _bb_ projects,
60 Boost.Python to build, but doing things this way will save you from
66 build Boost.Python and its extensions, but they are not
68 build Boost.Python” problems come from trying to use another
86 Boost.Python installation, which contains a small example project.
110 Python script called `test_extending.py`. You will also have
112 python.
119 Python installation. You might want to pass the
122 all the parts of your Python installation. If it isn't, consider
130 * The _bp_list_ for issues specifically related to Boost.Python
135 Rejoice! If you're new to Boost.Python, at this point it might be
145 source file called `extending.cpp`, inside your Boost.Python
177 `/home/dave/boost_1_34_0/libs/python/example/quickstart` to
215 # the name in `Jamroot` immediately following `python-extension`, and
221 python-extension extending : extending.cpp ;
225 python-extension hello : extending.cpp ;
239 [section Installing Boost.Python on your System]
241 Since Boost.Python is a separately-compiled (as opposed to
243 Boost.Python library binary.
245 If you need a regular installation of the Boost.Python library
248 from source, you might want to supply the `--with-python`
249 argument to `bjam` (or the `--with-libraries=python` argument
250 to `configure`), so only the Boost.Python binary will be built,
260 how to invoke Python, `#include` its headers, and link with its
268 Boost.Python binaries were built, your `user-config.jam` file is probably already
271 If you have one fairly “standard” python installation for your
273 you haven't configured python in `user-config.jam` (and you don't
274 specify `--without-python` on the Boost.Build command line),
279 using python ;
281 which automatically looks for Python in the most likely places.
282 However, that only happens when using the Boost.Python project file
285 Boost.Python binaries, you should set up a `user-config.jam` file
288 [section Python Configuration Parameters]
290 If you have several versions of Python installed, or Python is
292 the following optional parameters to `using python`.
297 [the version of Python to use. Should be in Major.Minor
299 version (i.e. *not* `2.5.1`). If you have multiple Python
305 [preferably, a command that invokes a Python interpreter.
306 Alternatively, the installation prefix for Python libraries and
308 no appropriate Python executable available.]]
312 [the `#include` paths for Python headers. Normally the correct
318 [the path to Python library binaries. On MacOS/Darwin,
319 you can also pass the path of the Python framework. Normally the
327 Boost.Build selects a Python configuration to use. See examples
335 targeting a Windows debug build of Python, and will be set
337 [link building.python_debugging_builds <python-debugging>] feature.
339 a specially configured [@https://wiki.ubuntu.com/PyDbgBuilds <python-dbg>]
349 * If you have both python 2.5 and python 2.4 installed,
353 using python : 2.5 ; # Make both versions of Python available
354 using python : 2.4 ; # To build with python 2.4, add python=2.4
358 against python 2.4, add `python=2.4` to the `bjam` command line.
360 * If you have python installed in an unusual location, you might
365 using python : : /usr/local/python-2.6-beta/bin/python ;
368 * If you have a separate build of Python for use with a particular
373 using python ; # use for most toolsets
376 using python
378 : c:\\Devel\\Python-2.5-IntelBuild\\PCBuild\\python # cmd-or-prefix
385 * If you have downloaded the Python sources and built both the
386 normal and the [link building.python_debugging_builds "python debugging"]
390 using python : 2.5 : C:\\src\\Python-2.5\\PCBuild\\python ;
391 using python : 2.5 : C:\\src\\Python-2.5\\PCBuild\\python_d
394 : <python-debugging>on ;
397 can build/test both Windows and Cygwin_ python extensions. Just pass
399 for the cygwin python installation:
403 using python ;
406 using python : : c:\\cygwin\\bin\\python2.5 : : : <target-os>cygwin ;
409 with the cygwin version of python: [#flavor]_
415 python with a [@http://cygwin.com Cygwin] bjam) but it seems as though the support in
424 using python : 2.5 ; # a regular windows build
425 using python : 2.4 : : : : <target-os>cygwin ;
435 bjam target-os=cygwin/python=2.4
440 [section Choosing a Boost.Python Library Binary]
443 libraries automatically—you choose to use a pre-built Boost.Python
445 Boost.Python binary comes in both static and dynamic flavors. Take
447 Information about how to identify the static and dynamic builds of Boost.Python on
459 will always use different copies of the Boost.Python library
460 when loaded into the same Python instance. Not using different
464 since an extension module and the Boost.Python library would
471 class exposed to Python in one dynamically-loaded extension
477 It might be appropriate to use the static Boost.Python library in
480 * You are _extending_ python and the types exposed in your
482 other Boost.Python extension modules, and you don't care if the
485 * You are _embedding_ python in your application and either:
489 Boost.Python library symbols that are part of the executable.
491 * Or, you have statically linked some Boost.Python extension
493 dynamically-loaded Boost.Python extension modules are able to
501 1. If you should ever have occasion to `#include "python.h"`
502 directly in a translation unit of a program using Boost.Python,
503 use `#include "boost/python/detail/wrap_python.hpp"` instead.
504 It handles several issues necessary for use with Boost.Python,
509 Python, or more properly, by Python's interaction with your
511 [@http://docs.python.org/ext/simpleExample.html] for details.
514 [section Python Debugging Builds]
516 Python can be built in a special “python debugging” configuration
520 Python executable built with python debugging enabled cannot be
524 Since pre-built “python debugging” versions of the Python
526Python, [footnote On Unix and similar platforms, a debugging python and associated libraries are b…
527 to build them, Boost.Build does not automatically enable python
530 `python-debugging` that, when used as a build property, will
534 On unix-variant platforms, the debugging versions of Python's data
537 the preprocessor symbol `_DEBUG`, Python defaults to force
538 linking with a special debugging version of the Python DLL. Since
539 that symbol is very commonly used even when Python is not present,
540 Boost.Python temporarily undefines `_DEBUG` when `Python.h`
541 is #included from `boost/python/detail/wrap_python.hpp` - unless
543python debugging”and you aren't using Boost.Build, you should make
544 sure `BOOST_DEBUG_PYTHON` is defined, or python debugging will be
548 [section Testing Boost.Python]
550 To run the full test suite for Boost.Python, invoke `bjam` in the
551 `test` subdirectory of your Boost.Python distribution.
556 If you are using a version of Python prior to 2.4.1 with a MinGW
558 create a MinGW-compatible version of the Python library; the one
559 shipped with Python will only work with a Microsoft-compatible
562 [@https://docs.python.org/2/install/index.html Installing Python Modules]
564 version numbers of your Python installation.