Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame] | 1 | <!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" |
| 20 | border="0" height="32" |
| 21 | alt="Previous Page" width="32"></A></td> |
| 22 | <td><A href="building.html"><img src="up.gif" |
| 23 | border="0" height="32" |
| 24 | alt="Up One Level" width="32"></A></td> |
| 25 | <td><A href="building-windows.html"><img src="next.gif" |
| 26 | border="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" |
| 30 | border="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"> </A> |
| 47 | <BR> |
| 48 | 2.1 Building the Module on a Unix System |
| 49 | </H2> |
| 50 | |
| 51 | <P> |
| 52 | pyOpenSSL uses distutils, so there really shouldn't be any problems. To build |
| 53 | the library: |
| 54 | <dl><dd><pre class="verbatim"> |
| 55 | python setup.py build |
| 56 | </pre></dl> |
| 57 | |
| 58 | <P> |
| 59 | If your OpenSSL header files aren't in <code>/usr/include</code>, you may need to |
| 60 | supply the <code>-I</code> flag to let the setup script know where to look. The same |
| 61 | goes 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"> |
| 65 | python setup.py build_ext -I/usr/local/ssl/include -L/usr/local/ssl/lib |
| 66 | python setup.py build |
| 67 | </pre></dl> |
| 68 | |
| 69 | <P> |
| 70 | Now 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, |
| 72 | so just: |
| 73 | <dl><dd><pre class="verbatim"> |
| 74 | python setup.py install |
| 75 | </pre></dl> |
| 76 | |
| 77 | <P> |
| 78 | If 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> |
| 82 | You can, of course, do |
| 83 | <dl><dd><pre class="verbatim"> |
| 84 | python setup.py --help |
| 85 | </pre></dl> |
| 86 | |
| 87 | <P> |
| 88 | to 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" |
| 97 | border="0" height="32" |
| 98 | alt="Previous Page" width="32"></A></td> |
| 99 | <td><A href="building.html"><img src="up.gif" |
| 100 | border="0" height="32" |
| 101 | alt="Up One Level" width="32"></A></td> |
| 102 | <td><A href="building-windows.html"><img src="next.gif" |
| 103 | border="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" |
| 107 | border="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> |