Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 1 | |
| 2 | INSTALLATION INSTRUCTIONS FOR pyOpenSSL |
| 3 | ------------------------------------------------------------------------------ |
| 4 | |
| 5 | I have tested this on Debian Linux systems (woody and sid), Solaris 2.6 and |
| 6 | 2.7. Others have successfully compiled it on Windows and NT. |
| 7 | |
| 8 | |
| 9 | -- Building the Module on a Unix System -- |
| 10 | |
| 11 | pyOpenSSL uses distutils, so there really shouldn't be any problems. To build |
| 12 | the library: |
| 13 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 14 | $ python setup.py build |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 15 | |
| 16 | If your OpenSSL header files aren't in /usr/include, you may need to supply |
| 17 | the -I flag to let the setup script know where to look. The same goes for the |
| 18 | libraries of course, use the -L flag. Note that build won't accept these |
| 19 | flags, so you have to run first build_ext and then build! Example: |
| 20 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 21 | $ python setup.py build_ext -I/usr/local/ssl/include -L/usr/local/ssl/lib |
| 22 | $ python setup.py build |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 23 | |
| 24 | Now you should have a directory called OpenSSL that contains e.g. SSL.so and |
| 25 | __init__.py somewhere in the build dicrectory, so just: |
| 26 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 27 | $ python setup.py install |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 28 | |
| 29 | If you, for some arcane reason, don't want the module to appear in the |
| 30 | site-packages directory, use the --prefix option. |
| 31 | |
| 32 | You can, of course, do |
| 33 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 34 | $ python setup.py --help |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 35 | |
| 36 | to find out more about how to use the script. |
| 37 | |
| 38 | |
| 39 | -- Building the Module on a Windows System -- |
| 40 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 41 | pyOpenSSL is known to build with mingw32 for Python 2.3 through Python 2.5. |
| 42 | For Python 2.6, the official Windows installer of which is built with |
| 43 | Microsoft Visual Studio 2008 (version 9.0), Microsoft Visual Studio 2008 |
| 44 | (version 9.0) is required. You can specify that mingw32 be used by passing |
| 45 | the --compiler argument to build_ext. You will also need to specify the |
| 46 | location of the OpenSSL headers and libraries: |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 47 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 48 | C:\pyOpenSSL-X.Y> setup.py build_ext -c mingw32 -I C:\OpenSSL\include ^ |
| 49 | -L C:\OpenSSL bdist_msi |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 50 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 51 | The correct header and library paths depend on how you have OpenSSL |
| 52 | installed. The above paths are correct for the default installation of |
| 53 | (<http://www.slproweb.com/products/Win32OpenSSL.html>). |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 54 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 55 | The bdist_msi command will build an MSI installer. It can be substituted |
| 56 | with another bdist command if another kind of installer is desired. |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 57 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 58 | To build with MSVC instead, omit the -c option and pass a slightly different |
| 59 | library directory: |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 60 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 61 | C:\pyOpenSSL-X.Y> setup.py build_ext -I C:\OpenSSL\include ^ |
| 62 | -L C:\OpenSSL\lib bdist_msi |
| 63 | |
| 64 | The resulting binary distribution will be placed in the dist directory. To |
| 65 | install it, dDepending on what kind of distribution you create, run it, |
| 66 | unzip it, or copy it to Python installation's site-packages. |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 67 | |
| 68 | And similarily, you can do |
| 69 | |
| 70 | setup.py --help |
| 71 | |
| 72 | to get more information. |
| 73 | |
Jean-Paul Calderone | baba569 | 2009-07-21 12:08:47 -0400 | [diff] [blame] | 74 | Big thanks to Itamar Shtull-Trauring, Oleg Orlov, Zooko O'Whielacronx, Chris |
| 75 | Galvan, and #python and #distutils on FreeNode for their help with Windows |
| 76 | build instructions. |
Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 77 | |
| 78 | -- Documentation -- |
| 79 | |
| 80 | The documentation is written in LaTeX, using the standard Python templates, |
| 81 | and tools to compile it into a number of forms are included. You need to |
| 82 | supply things like dvips, latex2html yourself of course! |
| 83 | |
| 84 | To build the text, html, postscript or dvi forms of the documentation, this is |
| 85 | what you do: |
| 86 | |
| 87 | cd doc |
| 88 | # To make the text-only documentation: |
| 89 | make text |
| 90 | # To make the dvi form: |
| 91 | make dvi |
| 92 | |
| 93 | It's as simple as that. Note that since Python's mkhowto script is used, if |
| 94 | you do first ``make dvi'' and then ``make ps'', the dvi file will disappear. |
| 95 | I included a special build target ``make all'' that will build all the |
| 96 | documentation in an order that won't let anything disappear. |
| 97 | |
| 98 | |
| 99 | @(#) $Id: INSTALL,v 1.7 2002/06/14 12:14:19 martin Exp $ |