~exarkun/pyopenssl/trunk

« back to all changes in this revision

Viewing changes to doc/install.rst

  • Committer: Jean-Paul Calderone
  • Date: 2011-09-11 19:49:43 UTC
  • mfrom: (156.3.22 sphinx-doc)
  • Revision ID: exarkun@divmod.com-20110911194943-ucaan2tzidk7ek5l
Convert the documentation from LaTeX/epytext to Sphinx/ReST

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _building:
 
2
 
 
3
Building and Installing
 
4
=======================
 
5
 
 
6
These instructions can also be found in the file ``INSTALL``.
 
7
 
 
8
I have tested this on Debian Linux systems (woody and sid), Solaris 2.6 and
 
9
2.7. Others have successfully compiled it on Windows and NT.
 
10
 
 
11
.. _building-unix:
 
12
 
 
13
Building the Module on a Unix System
 
14
------------------------------------
 
15
 
 
16
pyOpenSSL uses distutils, so there really shouldn't be any problems. To build
 
17
the library::
 
18
 
 
19
    python setup.py build
 
20
 
 
21
If your OpenSSL header files aren't in ``/usr/include``, you may need to supply
 
22
the ``-I`` flag to let the setup script know where to look. The same goes for
 
23
the libraries of course, use the ``-L`` flag. Note that ``build`` won't accept
 
24
these flags, so you have to run first ``build_ext`` and then ``build``!
 
25
Example::
 
26
 
 
27
    python setup.py build_ext -I/usr/local/ssl/include -L/usr/local/ssl/lib
 
28
    python setup.py build
 
29
 
 
30
Now you should have a directory called ``OpenSSL`` that contains e.g.
 
31
``SSL.so`` and ``__init__.py`` somewhere in the build dicrectory,
 
32
so just::
 
33
 
 
34
    python setup.py install
 
35
 
 
36
If you, for some arcane reason, don't want the module to appear in the
 
37
``site-packages`` directory, use the ``--prefix`` option.
 
38
 
 
39
You can, of course, do::
 
40
 
 
41
    python setup.py --help
 
42
 
 
43
to find out more about how to use the script.
 
44
 
 
45
.. _building-windows:
 
46
 
 
47
Building the Module on a Windows System
 
48
---------------------------------------
 
49
 
 
50
Big thanks to Itamar Shtull-Trauring and Oleg Orlov for their help with
 
51
Windows build instructions.  Same as for Unix systems, we have to separate
 
52
the ``build_ext`` and the ``build``.
 
53
 
 
54
Building the library::
 
55
 
 
56
    setup.py build_ext -I ...\openssl\inc32 -L ...\openssl\out32dll
 
57
    setup.py build
 
58
 
 
59
Where ``...\openssl`` is of course the location of your OpenSSL installation.
 
60
 
 
61
Installation is the same as for Unix systems::
 
62
 
 
63
    setup.py install
 
64
 
 
65
And similarily, you can do::
 
66
 
 
67
    setup.py --help
 
68
 
 
69
to get more information.