blob: b650ba6f40ea7980a1dd418fb4e12179f3fb9032 [file] [log] [blame]
Jean-Paul Calderone897bc252008-02-18 20:50:23 -05001
2INSTALLATION INSTRUCTIONS FOR pyOpenSSL
3------------------------------------------------------------------------------
4
5I have tested this on Debian Linux systems (woody and sid), Solaris 2.6 and
62.7. Others have successfully compiled it on Windows and NT.
7
8
9-- Building the Module on a Unix System --
10
11pyOpenSSL uses distutils, so there really shouldn't be any problems. To build
12the library:
13
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040014 $ python setup.py build
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050015
16If your OpenSSL header files aren't in /usr/include, you may need to supply
17the -I flag to let the setup script know where to look. The same goes for the
18libraries of course, use the -L flag. Note that build won't accept these
19flags, so you have to run first build_ext and then build! Example:
20
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040021 $ python setup.py build_ext -I/usr/local/ssl/include -L/usr/local/ssl/lib
22 $ python setup.py build
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050023
24Now 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 Calderonebaba5692009-07-21 12:08:47 -040027 $ python setup.py install
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050028
29If you, for some arcane reason, don't want the module to appear in the
30site-packages directory, use the --prefix option.
31
32You can, of course, do
33
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040034 $ python setup.py --help
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050035
36to find out more about how to use the script.
37
38
39-- Building the Module on a Windows System --
40
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040041pyOpenSSL is known to build with mingw32 for Python 2.3 through Python 2.5.
42For Python 2.6, the official Windows installer of which is built with
43Microsoft 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
45the --compiler argument to build_ext. You will also need to specify the
46location of the OpenSSL headers and libraries:
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050047
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040048 C:\pyOpenSSL-X.Y> setup.py build_ext -c mingw32 -I C:\OpenSSL\include ^
49 -L C:\OpenSSL bdist_msi
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050050
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040051The correct header and library paths depend on how you have OpenSSL
52installed. The above paths are correct for the default installation of
53(<http://www.slproweb.com/products/Win32OpenSSL.html>).
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050054
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040055The bdist_msi command will build an MSI installer. It can be substituted
56with another bdist command if another kind of installer is desired.
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050057
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040058To build with MSVC instead, omit the -c option and pass a slightly different
59library directory:
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050060
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040061 C:\pyOpenSSL-X.Y> setup.py build_ext -I C:\OpenSSL\include ^
62 -L C:\OpenSSL\lib bdist_msi
63
64The resulting binary distribution will be placed in the dist directory. To
65install it, dDepending on what kind of distribution you create, run it,
66unzip it, or copy it to Python installation's site-packages.
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050067
68And similarily, you can do
69
70 setup.py --help
71
72to get more information.
73
Jean-Paul Calderonebaba5692009-07-21 12:08:47 -040074Big thanks to Itamar Shtull-Trauring, Oleg Orlov, Zooko O'Whielacronx, Chris
75Galvan, and #python and #distutils on FreeNode for their help with Windows
76build instructions.
Jean-Paul Calderone897bc252008-02-18 20:50:23 -050077
78-- Documentation --
79
80The documentation is written in LaTeX, using the standard Python templates,
81and tools to compile it into a number of forms are included. You need to
82supply things like dvips, latex2html yourself of course!
83
84To build the text, html, postscript or dvi forms of the documentation, this is
85what 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
93It's as simple as that. Note that since Python's mkhowto script is used, if
94you do first ``make dvi'' and then ``make ps'', the dvi file will disappear.
95I included a special build target ``make all'' that will build all the
96documentation 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 $