From 6945dad0369db7d03a37d90ef62ef9119a389bae Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 9 Jan 2018 08:23:19 -0700 Subject: [PATCH] Added python tool examples. Contributed by Tom Kent. Fixes #171. --- doc/src/reference.xml | 116 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/doc/src/reference.xml b/doc/src/reference.xml index 24652f15f..8c45dfb05 100644 --- a/doc/src/reference.xml +++ b/doc/src/reference.xml @@ -1783,6 +1783,122 @@ using bzip2 : 1.0.6 : <source>C:/Devel/src/bzip2-1.0.6 : <toolset>ms using bzip2 : 1.0.6 : : <toolset>gcc ; + +
+ Python + Python + + Provides support for the + python language + environment to be linked in as a library. + + python can be initialized using the following syntax + +using python : version : command-or-prefix : includes : libraries : conditions : extension-suffix ; + + Options for using python: + + + version + + the version of Python to use. Should be in Major.Minor + format, for example 2.3. Do not include the subminor version. + + + + + command-or-prefix + + Preferably, a command that invokes a Python interpreter. + Alternatively, the installation prefix for Python libraries + and includes. If empty, will be guessed from the version, the + platform's installation patterns, and the python executables + that can be found in PATH. + + + + includes + + the include path to Python headers. If empty, will be + guessed. + + + + libraries + + the path to Python library binaries. If empty, will + be guessed. On MacOS/Darwin, you can also pass the path of the + Python framework. + + + + conditions + + if specified, should be a set of properties that are + matched against the build configuration when Boost.Build + selects a Python configuration to use. + + + + extension-suffix + + A string to append to the name of extension modules + before the true filename extension. Ordinarily we would just + compute this based on the value of the <python-debugging> + feature. However ubuntu's python-dbg package uses the windows + convention of appending _d to debug-build extension modules. We + have no way of detecting ubuntu, or of probing python for the + "_d" requirement, and if you configure and build python using + --with-pydebug, you'll be using the standard *nix convention. + Defaults to "" (or "_d" when targeting windows and + <python-debugging> is set). + + + + Examples: + +# Find python in the default system location +using python ; +# 2.7 +using python : 2.7 ; +# 3.5 +using python : 3.5 ; + +# On ubuntu 16.04 +using python +: 2.7 # version +: # Interpreter/path to dir +: /usr/include/python2.7 # includes +: /usr/lib/x86_64-linux-gnu # libs +: # conditions +; + +using python +: 3.5 # version +: # Interpreter/path to dir +: /usr/include/python3.5 # includes +: /usr/lib/x86_64-linux-gnu # libs +: # conditions +; + +# On windows +using python +: 2.7 # version +: C:\\Python27-32\\python.exe # Interperter/path to dir +: C:\\Python27-32\\include # includes +: C:\\Python27-32\\libs # libs +: <address-model>32 <address-model> # conditions - both 32 and unspecified +; + +using python +: 2.7 # version +: C:\\Python27-64\\python.exe # Interperter/path to dir +: C:\\Python27-64\\include # includes +: C:\\Python27-64\\libs # libs +: <address-model>64 # conditions +; + +