blob: a255c56233b2cf35f5392ddf875c71e852aa202b [file] [log] [blame]
Jean-Paul Calderone897bc252008-02-18 20:50:23 -05001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<title>2.1 Building the Module on a Unix System </title>
5<META NAME="description" CONTENT="2.1 Building the Module on a Unix System ">
6<META NAME="keywords" CONTENT="pyOpenSSL">
7<META NAME="resource-type" CONTENT="document">
8<META NAME="distribution" CONTENT="global">
9<link rel="STYLESHEET" href="pyOpenSSL.css">
10<LINK REL="next" href="building-windows.html">
11<LINK REL="previous" href="building.html">
12<LINK REL="up" href="building.html">
13<LINK REL="next" href="building-windows.html">
14</head>
15<body>
16<DIV CLASS="navigation">
17<table align="center" width="100%" cellpadding="0" cellspacing="2">
18<tr>
19<td><A href="building.html"><img src="previous.gif"
20border="0" height="32"
21 alt="Previous Page" width="32"></A></td>
22<td><A href="building.html"><img src="up.gif"
23border="0" height="32"
24 alt="Up One Level" width="32"></A></td>
25<td><A href="building-windows.html"><img src="next.gif"
26border="0" height="32"
27 alt="Next Page" width="32"></A></td>
28<td align="center" width="100%">Python OpenSSL Manual</td>
29<td><A href="contents.html"><img src="contents.gif"
30border="0" height="32"
31 alt="Contents" width="32"></A></td>
32<td><img src="blank.gif"
33 border="0" height="32"
34 alt="" width="32"></td>
35<td><img src="blank.gif"
36 border="0" height="32"
37 alt="" width="32"></td>
38</tr></table>
39<b class="navlabel">Previous:</b> <a class="sectref" href="building.html">2 Building and Installing</A>
40<b class="navlabel">Up:</b> <a class="sectref" href="building.html">2 Building and Installing</A>
41<b class="navlabel">Next:</b> <a class="sectref" href="building-windows.html">2.2 Building the Module</A>
42<br><hr>
43</DIV>
44<!--End of Navigation Panel-->
45
46<H2><A NAME="SECTION000310000000000000000">&nbsp;</A>
47<BR>
482.1 Building the Module on a Unix System
49</H2>
50
51<P>
52pyOpenSSL uses distutils, so there really shouldn't be any problems. To build
53the library:
54<dl><dd><pre class="verbatim">
55python setup.py build
56</pre></dl>
57
58<P>
59If your OpenSSL header files aren't in <code>/usr/include</code>, you may need to
60supply the <code>-I</code> flag to let the setup script know where to look. The same
61goes for the libraries of course, use the <code>-L</code> flag. Note that
62<code>build</code> won't accept these flags, so you have to run first
63<code>build_ext</code> and then <code>build</code>! Example:
64<dl><dd><pre class="verbatim">
65python setup.py build_ext -I/usr/local/ssl/include -L/usr/local/ssl/lib
66python setup.py build
67</pre></dl>
68
69<P>
70Now you should have a directory called <code>OpenSSL</code> that contains e.g.
71<code>SSL.so</code> and <code>__init__.py</code> somewhere in the build dicrectory,
72so just:
73<dl><dd><pre class="verbatim">
74python setup.py install
75</pre></dl>
76
77<P>
78If you, for some arcane reason, don't want the module to appear in the
79<code>site-packages</code> directory, use the <code>--prefix</code> option.
80
81<P>
82You can, of course, do
83<dl><dd><pre class="verbatim">
84python setup.py --help
85</pre></dl>
86
87<P>
88to find out more about how to use the script.
89
90<P>
91
92<DIV CLASS="navigation">
93<p><hr>
94<table align="center" width="100%" cellpadding="0" cellspacing="2">
95<tr>
96<td><A href="building.html"><img src="previous.gif"
97border="0" height="32"
98 alt="Previous Page" width="32"></A></td>
99<td><A href="building.html"><img src="up.gif"
100border="0" height="32"
101 alt="Up One Level" width="32"></A></td>
102<td><A href="building-windows.html"><img src="next.gif"
103border="0" height="32"
104 alt="Next Page" width="32"></A></td>
105<td align="center" width="100%">Python OpenSSL Manual</td>
106<td><A href="contents.html"><img src="contents.gif"
107border="0" height="32"
108 alt="Contents" width="32"></A></td>
109<td><img src="blank.gif"
110 border="0" height="32"
111 alt="" width="32"></td>
112<td><img src="blank.gif"
113 border="0" height="32"
114 alt="" width="32"></td>
115</tr></table>
116<b class="navlabel">Previous:</b> <a class="sectref" href="building.html">2 Building and Installing</A>
117<b class="navlabel">Up:</b> <a class="sectref" href="building.html">2 Building and Installing</A>
118<b class="navlabel">Next:</b> <a class="sectref" href="building-windows.html">2.2 Building the Module</A>
119<hr>
120<span class="release-info">Release 0.6.</span>
121</DIV>
122<!--End of Navigation Panel-->
123
124</BODY>
125</HTML>