Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / html / python / inst / trivial-install.html
CommitLineData
86530b38
AT
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html>
3<head>
4<link rel="STYLESHEET" href="inst.css" type='text/css' />
5<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
6<link rel='start' href='../index.html' title='Python Documentation Index' />
7<link rel="first" href="inst.html" title='Installing Python Modules' />
8<link rel='last' href='about.html' title='About this document...' />
9<link rel='help' href='about.html' title='About this document...' />
10<link rel="next" href="standard-install.html" />
11<link rel="prev" href="inst.html" />
12<link rel="parent" href="inst.html" />
13<link rel="next" href="standard-install.html" />
14<meta name='aesop' content='information' />
15<title>1 Introduction</title>
16</head>
17<body>
18<DIV CLASS="navigation">
19<div id='top-navigation-panel' xml:id='top-navigation-panel'>
20<table align="center" width="100%" cellpadding="0" cellspacing="2">
21<tr>
22<td class='online-navigation'><a rel="prev" title="Installing Python Modules"
23 href="inst.html"><img src='../icons/previous.png'
24 border='0' height='32' alt='Previous Page' width='32' /></A></td>
25<td class='online-navigation'><a rel="parent" title="Installing Python Modules"
26 href="inst.html"><img src='../icons/up.png'
27 border='0' height='32' alt='Up One Level' width='32' /></A></td>
28<td class='online-navigation'><a rel="next" title="2 Standard Build and"
29 href="standard-install.html"><img src='../icons/next.png'
30 border='0' height='32' alt='Next Page' width='32' /></A></td>
31<td align="center" width="100%">Installing Python Modules</td>
32<td class='online-navigation'><img src='../icons/blank.png'
33 border='0' height='32' alt='' width='32' /></td>
34<td class='online-navigation'><img src='../icons/blank.png'
35 border='0' height='32' alt='' width='32' /></td>
36<td class='online-navigation'><img src='../icons/blank.png'
37 border='0' height='32' alt='' width='32' /></td>
38</tr></table>
39<div class='online-navigation'>
40<b class="navlabel">Previous:</b>
41<a class="sectref" rel="prev" href="inst.html">Installing Python Modules</A>
42<b class="navlabel">Up:</b>
43<a class="sectref" rel="parent" href="inst.html">Installing Python Modules</A>
44<b class="navlabel">Next:</b>
45<a class="sectref" rel="next" href="standard-install.html">2 Standard Build and</A>
46</div>
47<hr /></div>
48</DIV>
49<!--End of Navigation Panel-->
50<div class='online-navigation'>
51<!--Table of Child-Links-->
52<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a>
53
54<UL CLASS="ChildLinks">
55<LI><A href="trivial-install.html#SECTION000110000000000000000">1.1 Best case: trivial installation</a>
56<LI><A href="trivial-install.html#SECTION000120000000000000000">1.2 The new standard: Distutils</a>
57</ul>
58<!--End of Table of Child-Links-->
59</div>
60<HR>
61
62<H1><A NAME="SECTION000100000000000000000"></A>
63<A NAME="intro"></A>
64<BR>
651 Introduction
66</H1>
67
68<P>
69Although Python's extensive standard library covers many programming
70needs, there often comes a time when you need to add some new
71functionality to your Python installation in the form of third-party
72modules. This might be necessary to support your own programming, or to
73support an application that you want to use and that happens to be
74written in Python.
75
76<P>
77In the past, there has been little support for adding third-party
78modules to an existing Python installation. With the introduction of
79the Python Distribution Utilities (Distutils for short) in Python 2.0,
80this changed.
81
82<P>
83This document is aimed primarily at the people who need to install
84third-party Python modules: end-users and system administrators who just
85need to get some Python application running, and existing Python
86programmers who want to add some new goodies to their toolbox. You
87don't need to know Python to read this document; there will be some
88brief forays into using Python's interactive mode to explore your
89installation, but that's it. If you're looking for information on how
90to distribute your own Python modules so that others may use them, see
91the <em class="citetitle"><a
92 href="../dist/dist.html"
93 title="Distributing Python Modules"
94 >Distributing Python Modules</a></em> manual.
95
96<P>
97
98<H2><A NAME="SECTION000110000000000000000"></A>
99<A NAME="trivial-install"></A>
100<BR>
1011.1 Best case: trivial installation
102</H2>
103
104<P>
105In the best case, someone will have prepared a special version of the
106module distribution you want to install that is targeted specifically at
107your platform and is installed just like any other software on your
108platform. For example, the module developer might make an executable
109installer available for Windows users, an RPM package for users of
110RPM-based Linux systems (Red Hat, SuSE, Mandrake, and many others), a
111Debian package for users of Debian-based Linux systems, and so forth.
112
113<P>
114In that case, you would download the installer appropriate to your
115platform and do the obvious thing with it: run it if it's an executable
116installer, <code>rpm -&#45;install</code> it if it's an RPM, etc. You don't need
117to run Python or a setup script, you don't need to compile
118anything--you might not even need to read any instructions (although
119it's always a good idea to do so anyways).
120
121<P>
122Of course, things will not always be that easy. You might be interested
123in a module distribution that doesn't have an easy-to-use installer for
124your platform. In that case, you'll have to start with the source
125distribution released by the module's author/maintainer. Installing
126from a source distribution is not too hard, as long as the modules are
127packaged in the standard way. The bulk of this document is about
128building and installing modules from standard source distributions.
129
130<P>
131
132<H2><A NAME="SECTION000120000000000000000"></A>
133<A NAME="new-standard"></A>
134<BR>
1351.2 The new standard: Distutils
136</H2>
137
138<P>
139If you download a module source distribution, you can tell pretty
140quickly if it was packaged and distributed in the standard way, i.e.
141using the Distutils. First, the distribution's name and version number
142will be featured prominently in the name of the downloaded archive, e.g.
143<span class="file">foo-1.0.tar.gz</span> or <span class="file">widget-0.9.7.zip</span>. Next, the archive
144will unpack into a similarly-named directory: <span class="file">foo-1.0</span> or
145<span class="file">widget-0.9.7</span>. Additionally, the distribution will contain a
146setup script <span class="file">setup.py</span>, and a file named <span class="file">README.txt</span> or possibly
147just <span class="file">README</span>, which should explain that building and installing the
148module distribution is a simple matter of running
149
150<P>
151<div class="verbatim"><pre>
152python setup.py install
153</pre></div>
154
155<P>
156If all these things are true, then you already know how to build and
157install the modules you've just downloaded: Run the command above.
158Unless you need to install things in a non-standard way or customize the
159build process, you don't really need this manual. Or rather, the above
160command is everything you need to get out of this manual.
161
162<P>
163
164<DIV CLASS="navigation">
165<div class='online-navigation'>
166<p></p><hr />
167<table align="center" width="100%" cellpadding="0" cellspacing="2">
168<tr>
169<td class='online-navigation'><a rel="prev" title="Installing Python Modules"
170 href="inst.html"><img src='../icons/previous.png'
171 border='0' height='32' alt='Previous Page' width='32' /></A></td>
172<td class='online-navigation'><a rel="parent" title="Installing Python Modules"
173 href="inst.html"><img src='../icons/up.png'
174 border='0' height='32' alt='Up One Level' width='32' /></A></td>
175<td class='online-navigation'><a rel="next" title="2 Standard Build and"
176 href="standard-install.html"><img src='../icons/next.png'
177 border='0' height='32' alt='Next Page' width='32' /></A></td>
178<td align="center" width="100%">Installing Python Modules</td>
179<td class='online-navigation'><img src='../icons/blank.png'
180 border='0' height='32' alt='' width='32' /></td>
181<td class='online-navigation'><img src='../icons/blank.png'
182 border='0' height='32' alt='' width='32' /></td>
183<td class='online-navigation'><img src='../icons/blank.png'
184 border='0' height='32' alt='' width='32' /></td>
185</tr></table>
186<div class='online-navigation'>
187<b class="navlabel">Previous:</b>
188<a class="sectref" rel="prev" href="inst.html">Installing Python Modules</A>
189<b class="navlabel">Up:</b>
190<a class="sectref" rel="parent" href="inst.html">Installing Python Modules</A>
191<b class="navlabel">Next:</b>
192<a class="sectref" rel="next" href="standard-install.html">2 Standard Build and</A>
193</div>
194</div>
195<hr />
196<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
197</DIV>
198<!--End of Navigation Panel-->
199<ADDRESS>
200See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
201</ADDRESS>
202</BODY>
203</HTML>