aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-08-06 15:42:56 +0000
committerlloyd <[email protected]>2011-08-06 15:42:56 +0000
commitea508001e058f7d330b0d61882684ed27deb1a6d (patch)
treee060cb55fc9841a6d405271adc5c77bdcc100af6
parent5d49754d5cf0819d00d31d47171e4a3e239fbd4b (diff)
Add the start of Python docs
Describe how to build a universal binary on OS X Fix tr1::function syntax so Sphinx is happy.
-rw-r--r--doc/building.txt24
-rw-r--r--doc/contents.txt1
-rw-r--r--doc/index.txt5
-rw-r--r--doc/python.txt14
-rw-r--r--doc/ssl.txt4
5 files changed, 42 insertions, 6 deletions
diff --git a/doc/building.txt b/doc/building.txt
index 9e7be79a3..044e46c3d 100644
--- a/doc/building.txt
+++ b/doc/building.txt
@@ -136,6 +136,26 @@ self-test program::
$ install_name_tool -change $(otool -X -D libbotan-$VERSION.dylib) \
$PWD/libbotan-$VERSION.dylib check
+Building Universal Binaries
+&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
+
+To build a universal binary for OS X, some simple modifications are
+required. First, create a CPU type for the target universalbinary,
+one that doesn't specify any special handlers. This is done by
+creating an empty file in src/build-data/arch::
+
+ $ touch src/build-data/arch/universalbinary.txt
+
+and then adding a special target for it in gcc, by adding the line::
+
+ universalbinary -> "-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc"
+
+in the section marked `<mach_abi_linking>` in
+`src/build-data/cc/gcc.txt`. Then configure with::
+
+ $ ./configure.py --cpu=universalbinary [other options here]
+
+
On MS Windows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -391,8 +411,8 @@ against is the same one you used to run ``configure.py``.
To install the module, use the ``install`` target.
-Examples of using the Python module can be seen in
-``doc/examples/python``
+See :doc:`Python Bindings <python>` for more information about the
+binding.
Building the Perl XS wrappers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/doc/contents.txt b/doc/contents.txt
index 16060e82a..dd600d587 100644
--- a/doc/contents.txt
+++ b/doc/contents.txt
@@ -21,6 +21,7 @@ Contents
passhash
rng
fpe
+ python
.. toctree::
:hidden:
diff --git a/doc/index.txt b/doc/index.txt
index f2f54e557..75e2ca434 100644
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -9,8 +9,9 @@ provides applications with most any :doc:`cryptographic algorithm
message processing system <filters>`, and a wide variety of other
features. A third party open source implementation of `SSHv2
<http://www.netsieben.com/products/ssh/>`_ that uses botan is also
-available. In addition to C++ you can use botan from Python or Perl,
-though the current bindings only wrap portions of the library.
+available. In addition to C++ you can use botan from :doc:`Python
+<python>` or Perl, though the current bindings only wrap portions of
+the library.
See the :doc:`faq` for a list of common questions and answers.
diff --git a/doc/python.txt b/doc/python.txt
new file mode 100644
index 000000000..dcd274eed
--- /dev/null
+++ b/doc/python.txt
@@ -0,0 +1,14 @@
+
+Python Binding
+========================================
+
+.. highlight:: python
+
+.. note::
+
+ The Python binding should be considered alpha software, and the
+ interfaces may change in the future.
+
+Botan includes a binding for Python, implemented using Boost.Python.
+
+.. literalinclude:: examples/python/rsa.py
diff --git a/doc/ssl.txt b/doc/ssl.txt
index adca78bf8..f536b7198 100644
--- a/doc/ssl.txt
+++ b/doc/ssl.txt
@@ -20,8 +20,8 @@ TLS Clients
.. cpp:class:: TLS_Client
.. cpp:function:: TLS_Client( \
- std::tr1::function<size_t (byte*, size_t)> input_fn, \
- std::tr1::function<void (const byte*, size_t)> output_fn, \
+ std::tr1::function<size_t, byte*, size_t> input_fn, \
+ std::tr1::function<void, const byte*, size_t> output_fn, \
const TLS_Policy& policy, RandomNumberGenerator& rng)
Creates a TLS client. It will call *input_fn* to read bytes from