@@ -168,7 +168,7 @@ \subsection{Platform variations}
168168You should always run the setup command from the distribution root
169169directory, i.e. the top-level subdirectory that the module source
170170distribution unpacks into. For example, if you've just downloaded a
171- module source distribution \file {foo-1.0.tar.gz} onto a Unix system, the
171+ module source distribution \file {foo-1.0.tar.gz} onto a Unix system, the
172172normal thing to do is:
173173\begin {verbatim }
174174gunzip -c foo-1.0.tar.gz | tar xf - # unpacks into directory foo-1.0
@@ -177,10 +177,11 @@ \subsection{Platform variations}
177177\end {verbatim }
178178
179179On Windows, you'd probably unpack the archive before opening the command
180- prompt. If you downloaded the archive file to \file {C:\textbackslash {}Temp},
181- then it probably unpacked (depending on your software) into
182- \file {C:\textbackslash {}Temp\textbackslash {}foo-1.0}; from the command prompt window,
183- you would then run
180+ prompt. If you downloaded the archive file to
181+ \file {C:\textbackslash {}Temp}, then it probably unpacked (depending on
182+ your software) into
183+ \file {C:\textbackslash {}Temp\textbackslash {}foo-1.0}; from the command
184+ prompt window, you would then run
184185\begin {verbatim }
185186cd c:\temp\foo-1.0
186187python setup.py install
@@ -219,8 +220,8 @@ \subsection{How building works}
219220the files to install into a \emph {build directory }. By default, this is
220221\file {build} under the distribution root; if you're excessively
221222concerned with speed, or want to keep the source tree pristine, you can
222- change the build directory with the \longprogramopt {build-base} option. For
223- example:
223+ change the build directory with the \longprogramopt {build-base} option.
224+ For example:
224225\begin {verbatim }
225226python setup.py build --build-base=/tmp/pybuild/foo-1.0
226227\end {verbatim }
@@ -269,23 +270,23 @@ \subsection{How installation works}
269270\begin {tableiv }{l|l|l|c}{textrm}%
270271 {Platform}{Standard installation location}{Default value}{Notes}
271272 \lineiv {Unix (pure)}
272- {\filenq {\var {prefix}/lib/python1.6/site-packages}}
273+ {\filenq {\filevar {prefix}/lib/python1.6/site-packages}}
273274 {\filenq {/usr/local/lib/python1.6/site-packages}}
274275 {(1)}
275276 \lineiv {Unix (non-pure)}
276- {\filenq {\var {exec-prefix}/lib/python1.6/site-packages}}
277+ {\filenq {\filevar {exec-prefix}/lib/python1.6/site-packages}}
277278 {\filenq {/usr/local/lib/python1.6/site-packages}}
278279 {(1)}
279280 \lineiv {Windows}
280- {\filenq {\var {prefix}}}
281+ {\filenq {\filevar {prefix}}}
281282 {\filenq {C:\textbackslash {}Python}}
282283 {(2)}
283284 \lineiv {Mac~OS (pure)}
284- {\filenq {\var {prefix}:Lib}}
285+ {\filenq {\filevar {prefix}:Lib}}
285286 {\filenq {Python:Lib} \XXX {???}}
286287 {}
287288 \lineiv {Mac~OS (non-pure)}
288- {\var {prefix}:Mac:PlugIns}
289+ {\filevar {prefix}:Mac:PlugIns}
289290 {\filenq {Python:Mac:PlugIns}\XXX {???}}
290291 {}
291292\end {tableiv }
@@ -298,8 +299,8 @@ \subsection{How installation works}
298299 any Unix-like system), the default \filevar {prefix} and
299300 \filevar {exec-prefix} are \file {/usr/local}.
300301\item [(2)] The default installation directory on Windows was
301- \file {C:\textbackslash {}Program Files\textbackslash {}Python} under Python 1.6a1,
302- 1.5.2, and earlier.
302+ \file {C:\textbackslash {}Program Files\textbackslash {}Python} under
303+ Python 1.6a1, 1.5.2, and earlier.
303304\end {description }
304305
305306\filevar {prefix} and \filevar {exec-prefix} stand for the directories
@@ -397,9 +398,9 @@ \subsection{Alternate installation: Unix (the home scheme)}
397398python setup.py install --home=~
398399\end {verbatim }
399400
400- The \longprogramopt {home} option defines the installation base directory. Files
401- are installed to the following directories under the installation base
402- as follows:
401+ The \longprogramopt {home} option defines the installation base
402+ directory. Files are installed to the following directories under the
403+ installation base as follows:
403404\installscheme {home}{/lib/python}
404405 {home}{/lib/python}
405406 {home}{/bin}
@@ -438,30 +439,31 @@ \subsection{Alternate installation: Unix (the prefix scheme)}
438439/usr/local/bin/python setup.py install --prefix=/mnt/@server/export
439440\end {verbatim }
440441
441- In either case, the \longprogramopt {prefix} option defines the installation
442- base, and the \longprogramopt {exec-prefix} option defines the platform-specific
443- installation base, which is used for platform-specific files.
444- (Currently, this just means non-pure module distributions, but could be
445- expanded to C libraries, binary executables, etc.) If
446- \longprogramopt {exec-prefix} is not supplied, it defaults to \longprogramopt {prefix}.
447- Files are installed as follows:
442+ In either case, the \longprogramopt {prefix} option defines the
443+ installation base, and the \longprogramopt {exec-prefix} option defines
444+ the platform-specific installation base, which is used for
445+ platform-specific files. (Currently, this just means non-pure module
446+ distributions, but could be expanded to C libraries, binary executables,
447+ etc.) If \longprogramopt {exec-prefix} is not supplied, it defaults to
448+ \longprogramopt {prefix}. Files are installed as follows:
448449
449450\installscheme {prefix}{/lib/python1.\filevar {X}/site-packages}
450451 {exec-prefix}{/lib/python1.\filevar {X}/site-packages}
451452 {prefix}{/bin}
452453 {prefix}{/share}
453454
454- There is no requirement that \longprogramopt {prefix} or \longprogramopt {exec-prefix}
455- actually point to an alternate Python installation; if the directories
456- listed above do not already exist, they are created at installation
457- time.
455+ There is no requirement that \longprogramopt {prefix} or
456+ \longprogramopt {exec-prefix} actually point to an alternate Python
457+ installation; if the directories listed above do not already exist, they
458+ are created at installation time.
458459
459460Incidentally, the real reason the prefix scheme is important is simply
460461that a standard Unix installation uses the prefix scheme, but with
461- \longprogramopt {prefix} and \longprogramopt {exec-prefix} supplied by Python itself (as
462- \code {sys.prefix} and \code {sys.exec\_ prefix}). Thus, you might think
463- you'll never use the prefix scheme, but every time you run \code {python
464- setup.py install} without any other options, you're using it.
462+ \longprogramopt {prefix} and \longprogramopt {exec-prefix} supplied by
463+ Python itself (as \code {sys.prefix} and \code {sys.exec\_ prefix}). Thus,
464+ you might think you'll never use the prefix scheme, but every time you
465+ run \code {python setup.py install} without any other options, you're
466+ using it.
465467
466468Note that installing extensions to an alternate Python installation has
467469no effect on how those extensions are built: in particular, the Python
@@ -472,27 +474,27 @@ \subsection{Alternate installation: Unix (the prefix scheme)}
472474interpreter used to build them. The best way to do this is to ensure
473475that the two interpreters are the same version of Python (possibly
474476different builds, or possibly copies of the same build). (Of course, if
475- your \longprogramopt {prefix} and \longprogramopt {exec-prefix} don't even point to an
476- alternate Python installation, this is immaterial.)
477+ your \longprogramopt {prefix} and \longprogramopt {exec-prefix} don't even
478+ point to an alternate Python installation, this is immaterial.)
477479
478480
479481\subsection {Alternate installation: Windows }
480482\label {sec:alt-windows }
481483
482484Since Windows has no conception of a user's home directory, and since
483485the standard Python installation under Windows is simpler than that
484- under Unix, there's no point in having separate \longprogramopt {prefix} and
485- \longprogramopt {home} options. Just use the \longprogramopt {prefix} option to specify
486- a base directory, e.g.
486+ under Unix, there's no point in having separate \longprogramopt {prefix}
487+ and \longprogramopt {home} options. Just use the \longprogramopt {prefix}
488+ option to specify a base directory, e.g.
487489\begin {verbatim }
488490python setup.py install --prefix="\Temp\Python"
489491\end {verbatim }
490492to install modules to the \file {\textbackslash {}Temp} directory on the current
491493drive.
492494
493- The installation base is defined by the \longprogramopt {prefix} option; the
494- \longprogramopt {exec-prefix} option is not supported under Windows. Files are
495- installed as follows:
495+ The installation base is defined by the \longprogramopt {prefix} option;
496+ the \longprogramopt {exec-prefix} option is not supported under Windows.
497+ Files are installed as follows:
496498\installscheme {prefix}{}
497499 {prefix}{}
498500 {prefix}{\textbackslash {}Scripts}
@@ -504,8 +506,8 @@ \subsection{Alternate installation: Mac~OS}
504506
505507Like Windows, Mac~OS has no notion of home directories (or even of
506508users), and a fairly simple standard Python installation. Thus, only a
507- \longprogramopt {prefix} option is needed. It defines the installation base, and
508- files are installed under it as follows:
509+ \longprogramopt {prefix} option is needed. It defines the installation
510+ base, and files are installed under it as follows:
509511
510512\XXX {how do MacPython users run the interpreter with command-line args?}
511513
@@ -541,16 +543,16 @@ \section{Custom Installation}
541543be relative, absolute, or explicitly defined in terms of one of the
542544installation base directories. (There are two installation base
543545directories, and they are normally the same---they only differ when you
544- use the Unix `` prefix scheme'' and supply different \longprogramopt {prefix} and
545- \longprogramopt {exec-prefix} options.)
546+ use the Unix `` prefix scheme'' and supply different
547+ \longprogramopt {prefix} and \longprogramopt { exec-prefix} options.)
546548
547549For example, say you're installing a module distribution to your home
548550directory under Unix---but you want scripts to go in
549- \file {\textasciitilde /scripts} rather than \file {\textasciitilde /bin}. As you might
550- expect, you can override this directory with the
551- \longprogramopt {install-scripts} option; in this case, it makes most sense to
552- supply a relative path, which will be interpreted relative to the
553- installation base directory (your home directory, in this case):
551+ \file {\textasciitilde /scripts} rather than \file {\textasciitilde /bin}.
552+ As you might expect, you can override this directory with the
553+ \longprogramopt {install-scripts} option; in this case, it makes most
554+ sense to supply a relative path, which will be interpreted relative to
555+ the installation base directory (your home directory, in this case):
554556\begin {verbatim }
555557python setup.py install --home --install-scripts=scripts
556558\end {verbatim }
0 commit comments