%!PS-Adobe-2.0
%%Creator: dvips(k) 5.96.1 Copyright 2007 Radical Eye Software
%%Title: paper-letter/inst.dvi
%%CreationDate: Fri Dec 19 16:19:45 2008
%%Pages: 14
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%DocumentFonts: Helvetica Helvetica-Oblique Times-Roman Times-Bold
%%+ Times-Italic Courier CMSY9 CMMI10 CMSY10
%%DocumentPaperSizes: Letter
%%EndComments
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -N0 -t letter -o paper-letter/inst.ps
%+ paper-letter/inst.dvi
%DVIPSParameters: dpi=600
%DVIPSSource: TeX output 2008.12.19:1619
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
(LaserWriter 16/600)]{A length product length le{A length product exch 0
exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
%%EndProcSet
%%BeginProcSet: 8r.enc 0 0
% File 8r.enc TeX Base 1 Encoding Revision 2.0 2002-10-30
%
% @@psencodingfile@{
% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry,
% W. Schmidt, P. Lehman",
% version = "2.0",
% date = "27nov06",
% filename = "8r.enc",
% email = "tex-fonts@@tug.org",
% docstring = "This is the encoding vector for Type1 and TrueType
% fonts to be used with TeX. This file is part of the
% PSNFSS bundle, version 9"
% @}
%
% The idea is to have all the characters normally included in Type 1 fonts
% available for typesetting. This is effectively the characters in Adobe
% Standard encoding, ISO Latin 1, Windows ANSI including the euro symbol,
% MacRoman, and some extra characters from Lucida.
%
% Character code assignments were made as follows:
%
% (1) the Windows ANSI characters are almost all in their Windows ANSI
% positions, because some Windows users cannot easily reencode the
% fonts, and it makes no difference on other systems. The only Windows
% ANSI characters not available are those that make no sense for
% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
% (173). quotesingle and grave are moved just because it's such an
% irritation not having them in TeX positions.
%
% (2) Remaining characters are assigned arbitrarily to the lower part
% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
%
% (3) Y&Y Lucida Bright includes some extra text characters; in the
% hopes that other PostScript fonts, perhaps created for public
% consumption, will include them, they are included starting at 0x12.
% These are /dotlessj /ff /ffi /ffl.
%
% (4) hyphen appears twice for compatibility with both ASCII and Windows.
%
% (5) /Euro was assigned to 128, as in Windows ANSI
%
% (6) Missing characters from MacRoman encoding incorporated as follows:
%
% PostScript MacRoman TeXBase1
% -------------- -------------- --------------
% /notequal 173 0x16
% /infinity 176 0x17
% /lessequal 178 0x18
% /greaterequal 179 0x19
% /partialdiff 182 0x1A
% /summation 183 0x1B
% /product 184 0x1C
% /pi 185 0x1D
% /integral 186 0x81
% /Omega 189 0x8D
% /radical 195 0x8E
% /approxequal 197 0x8F
% /Delta 198 0x9D
% /lozenge 215 0x9E
%
/TeXBase1Encoding [
% 0x00
/.notdef /dotaccent /fi /fl
/fraction /hungarumlaut /Lslash /lslash
/ogonek /ring /.notdef /breve
/minus /.notdef /Zcaron /zcaron
% 0x10
/caron /dotlessi /dotlessj /ff
/ffi /ffl /notequal /infinity
/lessequal /greaterequal /partialdiff /summation
/product /pi /grave /quotesingle
% 0x20
/space /exclam /quotedbl /numbersign
/dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus
/comma /hyphen /period /slash
% 0x30
/zero /one /two /three
/four /five /six /seven
/eight /nine /colon /semicolon
/less /equal /greater /question
% 0x40
/at /A /B /C
/D /E /F /G
/H /I /J /K
/L /M /N /O
% 0x50
/P /Q /R /S
/T /U /V /W
/X /Y /Z /bracketleft
/backslash /bracketright /asciicircum /underscore
% 0x60
/quoteleft /a /b /c
/d /e /f /g
/h /i /j /k
/l /m /n /o
% 0x70
/p /q /r /s
/t /u /v /w
/x /y /z /braceleft
/bar /braceright /asciitilde /.notdef
% 0x80
/Euro /integral /quotesinglbase /florin
/quotedblbase /ellipsis /dagger /daggerdbl
/circumflex /perthousand /Scaron /guilsinglleft
/OE /Omega /radical /approxequal
% 0x90
/.notdef /.notdef /.notdef /quotedblleft
/quotedblright /bullet /endash /emdash
/tilde /trademark /scaron /guilsinglright
/oe /Delta /lozenge /Ydieresis
% 0xA0
/.notdef /exclamdown /cent /sterling
/currency /yen /brokenbar /section
/dieresis /copyright /ordfeminine /guillemotleft
/logicalnot /hyphen /registered /macron
% 0xB0
/degree /plusminus /twosuperior /threesuperior
/acute /mu /paragraph /periodcentered
/cedilla /onesuperior /ordmasculine /guillemotright
/onequarter /onehalf /threequarters /questiondown
% 0xC0
/Agrave /Aacute /Acircumflex /Atilde
/Adieresis /Aring /AE /Ccedilla
/Egrave /Eacute /Ecircumflex /Edieresis
/Igrave /Iacute /Icircumflex /Idieresis
% 0xD0
/Eth /Ntilde /Ograve /Oacute
/Ocircumflex /Otilde /Odieresis /multiply
/Oslash /Ugrave /Uacute /Ucircumflex
/Udieresis /Yacute /Thorn /germandbls
% 0xE0
/agrave /aacute /acircumflex /atilde
/adieresis /aring /ae /ccedilla
/egrave /eacute /ecircumflex /edieresis
/igrave /iacute /icircumflex /idieresis
% 0xF0
/eth /ntilde /ograve /oacute
/ocircumflex /otilde /odieresis /divide
/oslash /ugrave /uacute /ucircumflex
/udieresis /yacute /thorn /ydieresis
] def
%%EndProcSet
%%BeginProcSet: texps.pro 0 0
%!
TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0
ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{
pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get
div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type
/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end
definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup
sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll
mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[
exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}
forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def
end
%%EndProcSet
%%BeginFont: CMSY10
%!PS-AdobeFont-1.1: CMSY10 1.0
%%CreationDate: 1991 Aug 15 07:20:57
% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
11 dict begin
/FontInfo 7 dict dup begin
/version (1.0) readonly def
/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
/FullName (CMSY10) readonly def
/FamilyName (Computer Modern) readonly def
/Weight (Medium) readonly def
/ItalicAngle -14.035 def
/isFixedPitch false def
end readonly def
/FontName /CMSY10 def
/PaintType 0 def
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0] readonly def
/Encoding 256 array
0 1 255 {1 index exch /.notdef put} for
dup 15 /bullet put
readonly def
/FontBBox{-29 -960 1116 775}readonly def
currentdict end
currentfile eexec
D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964
7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4
A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85
E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A
221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A
27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF
5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09
0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730
DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A
71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09
4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C
515DB70A8D4F6146FE068DC1E5DE8BC5703711DA090312BA3FC00A08C453C609
C627A8BECD6E1FA14A3B02476E90AAD8B4700C400380BC9AFFBF7847EB28661B
9DC3AA0F44C533F2E07DCC4DE19D367BF223E33DC321D0247A0E6EF6ABC8FA52
15AE044094EF678A8726CD7C011F02BFF8AB6EAEEE391AD837120823BED0B5D8
F8B15245377871A64F78378BB4330149D6941F7A86FBFFC49B93C94155F5FA7D
F22E7214511C0A92693F4CDBF38411651540572F2DD70D924AE0F18E1CD581F3
C871399127FF5D07A868885B5FF7CDEB50B8323B2533DEF8DC973B1AE84FA0A2
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
cleartomark
%%EndFont
%%BeginFont: CMMI10
%!PS-AdobeFont-1.1: CMMI10 1.100
%%CreationDate: 1996 Jul 23 07:53:57
% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
11 dict begin
/FontInfo 7 dict dup begin
/version (1.100) readonly def
/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
/FullName (CMMI10) readonly def
/FamilyName (Computer Modern) readonly def
/Weight (Medium) readonly def
/ItalicAngle -14.04 def
/isFixedPitch false def
end readonly def
/FontName /CMMI10 def
/PaintType 0 def
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0] readonly def
/Encoding 256 array
0 1 255 {1 index exch /.notdef put} for
dup 62 /greater put
readonly def
/FontBBox{-32 -250 1048 750}readonly def
currentdict end
currentfile eexec
D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
9E394A533A081C36D456A09920001A3D2199583EB9B84B4DEE08E3D12939E321
990CD249827D9648574955F61BAAA11263A91B6C3D47A5190165B0C25ABF6D3E
6EC187E4B05182126BB0D0323D943170B795255260F9FD25F2248D04F45DFBFB
DEF7FF8B19BFEF637B210018AE02572B389B3F76282BEB29CC301905D388C721
59616893E774413F48DE0B408BC66DCE3FE17CB9F84D205839D58014D6A88823
D9320AE93AF96D97A02C4D5A2BB2B8C7925C4578003959C46E3CE1A2F0EAC4BF
8B9B325E46435BDE60BC54D72BC8ACB5C0A34413AC87045DC7B84646A324B808
6FD8E34217213E131C3B1510415CE45420688ED9C1D27890EC68BD7C1235FAF9
1DAB3A369DD2FC3BE5CF9655C7B7EDA7361D7E05E5831B6B8E2EEC542A7B38EE
03BE4BAC6079D038ACB3C7C916279764547C2D51976BABA94BA9866D79F13909
95AA39B0F03103A07CBDF441B8C5669F729020AF284B7FF52A29C6255FCAACF1
74109050FBA2602E72593FBCBFC26E726EE4AEF97B7632BC4F5F353B5C67FED2
3EA752A4A57B8F7FEFF1D7341D895F0A3A0BE1D8E3391970457A967EFF84F6D8
47750B1145B8CC5BD96EE7AA99DDC9E06939E383BDA41175233D58AD263EBF19
AFC0E2F840512D321166547B306C592B8A01E1FA2564B9A26DAC14256414E4C8
42616728D918C74D13C349F4186EC7B9708B86467425A6FDB3A396562F7EE4D8
40B43621744CF8A23A6E532649B66C2A0002DD04F8F39618E4F572819DD34837
B5A08E643FDCA1505AF6A1FA3DDFD1FA758013CAED8ACDDBBB334D664DFF5B53
9560176676ABB71BBD0EE56B4CC492C0652750227CEC7B86E4740EB7B8775564
332769DD30794E501BBB0E4E5CB665F3628E10B1137CC8BC5C0A64A310B5E27E
5FD6E3B04DA3914C15987E638A72790AF4073CE9CDBF6E3C749CB4DFF9C54951
A58C386C54BC4E98B102B5E91E8567D2EEEF048F2CBD5D243701D20909290B4B
A3083F632D8552D42DEE0C69A4B14D8B15AA082DECC12B2ECAE6F663E6D09F81
EE2979EF41FBF12C9D8BF23B77E0A20088EBD107C5BF9DD6F03FFC3AB65B69A7
54953327E1D4AEF5A146273392BBDB321D4CC9A8FFFCFE5C515B466E21546CC7
C6209E5A76F916B03DB98BC6CED334F33E7B373D42761696F5A876CA6F93F16E
15A07E2E102148CA4F62A99C
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
cleartomark
%%EndFont
%%BeginFont: CMSY9
%!PS-AdobeFont-1.1: CMSY9 1.0
%%CreationDate: 1991 Aug 15 07:22:27
% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
11 dict begin
/FontInfo 7 dict dup begin
/version (1.0) readonly def
/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
/FullName (CMSY9) readonly def
/FamilyName (Computer Modern) readonly def
/Weight (Medium) readonly def
/ItalicAngle -14.035 def
/isFixedPitch false def
end readonly def
/FontName /CMSY9 def
/PaintType 0 def
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0] readonly def
/Encoding 256 array
0 1 255 {1 index exch /.notdef put} for
dup 110 /backslash put
readonly def
/FontBBox{-30 -958 1146 777}readonly def
currentdict end
currentfile eexec
D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964
7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4
A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85
E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A
221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A
27D1663E0B62F461F6E40A5D6676D0037D33F24E2FAC2B0009AD3C8350CDF8CC
65BCA87979C36D14CB552E9A985E48BE4E88ECA16DF418749AF04FDD2B0E1380
D281BB2476BB45FF30946B247DFD7F57305FA87E50CA338121C71CDFDF927A9C
77FF14CB4A1D6D80356FB1171ED38C37702350497B44E42CE31DB2F493807DAA
15B887C671199A54C4C1294BC520F5538C15556BC43C9F62342B121C6DCD6C5F
491DA47FF360201EE21C08A781ED0589A6DF91B99FE118B9B29E4F068672E52F
1A06C514D91C4C937D4E642503392B1CD1BE8C2F499A1AD3753691F4D1DAB520
BDD769BBCDAF968237D9A46AD1899410D3594B3AF945E894F1DE5176A6E251CA
0F18B516FC05626A7304DB1E7B5BCF5A9E5EC8BE59C6BBC21B87F6789768C630
5758F0A7B847BBFDB156DDCE8089E499002240DFA847142E7361BBB5301D9021
E17CF2305E7BAA2F556CDF147EACBFCF444772DC14B954EC09BD666280B159BC
8E5C78FE11B8145EA7D6E7799B3F0E7486EA5808A32B6A4068041C23D9D0D8AD
AB1CC078FA184EF3892F5BD9952F9B93ADA2CBC45985503FC7D967A94F374476
53F27028B241C5C7600951D452047B680F935C5A3EEBB8B2515F9C3675ADF0
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
cleartomark
%%EndFont
TeXDict begin 40258431 52099146 1000 600 600 (paper-letter/inst.dvi)
@start /Fa 134[29 1[42 1[32 16 29 19 1[32 32 32 48 13
2[13 32 32 1[32 32 29 1[32 38[16 8[32 1[16 16 46[{
TeXBase1Encoding ReEncodeFont}22 58.1154 /Helvetica rf
/Fb 204[25 25 25 49[{TeXBase1Encoding ReEncodeFont}3
49.8132 /Times-Roman rf /Fc 204[29 29 29 49[{
TeXBase1Encoding ReEncodeFont}3 58.1154 /Times-Roman
rf /Fd 240[42 15[{}1 83.022 /CMSY10 rf /Fe 170[72 85[{
TeXBase1Encoding ReEncodeFont}1 99.6264 /Times-Roman
rf /Ff 167[58 9[58 4[27 73[{TeXBase1Encoding ReEncodeFont}3
79.701 /Times-Roman rf /Fg 193[65 62[{}1 83.022 /CMMI10
rf /Fh 134[37 37 1[37 1[21 37 25 1[42 42 42 62 17 2[17
42 2[42 1[37 42 42 8[50 23[76 16[21 1[25 42[37 2[{
TeXBase1Encoding ReEncodeFont}22 74.7198 /Helvetica-Oblique
rf /Fi 145[38 110[{}1 74.7198 /CMSY9 rf /Fj 134[42 42
60 1[46 23 42 28 1[46 46 46 69 18 42 1[18 46 46 23 46
46 42 1[46 9[78 1[60 51 55 2[55 1[60 69 3[23 1[65 51
55 60 60 55 55 6[23 46 46 46 46 46 46 46 46 46 46 23
23 28 1[48 1[28 28 18 36[42 2[{TeXBase1Encoding ReEncodeFont}55
83.022 /Helvetica rf /Fk 103[45 27[45 1[45 45 45 45 45
45 45 45 45 1[45 45 45 45 45 45 1[45 45 45 45 45 45 45
45 45 45 45 1[45 45 45 2[45 3[45 45 45 1[45 45 1[45 45
3[45 45 1[45 1[45 1[45 45 1[45 45 45 1[45 45 1[45 45
45 45 45 45 45 45 45 45 45 45 2[45 45 45 2[45 45 45 34[{
TeXBase1Encoding ReEncodeFont}68 74.7198 /Courier rf
/Fl 103[50 30[50 50 50 50 50 50 50 50 1[50 50 50 50 50
2[50 50 50 50 50 50 50 50 50 1[50 1[50 1[50 2[50 3[50
3[50 50 1[50 50 3[50 2[50 3[50 2[50 50 50 1[50 4[50 2[50
2[50 50 50 50 50 50 50 50 50 2[50 36[{TeXBase1Encoding ReEncodeFont}51
83.022 /Courier rf /Fm 134[50 50 72 50 55 28 50 33 1[55
55 55 83 22 50 22 22 55 55 28 55 55 50 55 55 9[94 1[72
61 66 2[66 2[83 55 3[72 3[72 1[66 66 6[28 3[55 55 55
55 55 55 1[28 28 33 3[33 33 22 35[50 50 2[{
TeXBase1Encoding ReEncodeFont}50 99.6264 /Helvetica rf
/Fn 134[37 37 55 1[42 23 32 32 1[42 42 42 60 23 2[23
42 42 23 37 42 37 42 42 9[69 1[60 1[42 2[51 2[69 5[60
51 51 60 55 51 22[56 3[28 36[42 2[{TeXBase1Encoding ReEncodeFont}35
83.022 /Times-Italic rf /Fo 134[33 33 48 33 33 18 26
22 1[33 33 33 52 18 33 1[18 33 33 22 29 33 29 33 29 22
7[48 3[41 37 2[37 48 48 59 3[22 2[37 2[44 20[17 22 17
4[22 39[{TeXBase1Encoding ReEncodeFont}38 66.4176 /Times-Roman
rf /Fp 107[33 33 25[37 37 54 37 37 21 29 25 1[37 37 37
58 21 2[21 37 37 25 33 37 33 37 33 11[54 46 3[42 11[54
21[19 25 19 2[25 25 25 39[{TeXBase1Encoding ReEncodeFont}34
74.7198 /Times-Roman rf /Fq 139[25 29 33 14[33 42 37
31[54 65[{TeXBase1Encoding ReEncodeFont}7 74.7198 /Times-Bold
rf /Fr 103[25 29[37 37 37 54 1[42 21 37 25 1[42 42 42
62 17 37 1[17 42 42 21 42 42 37 42 42 12[46 50 54 1[50
58 54 62 42 3[54 1[46 50 54 54 1[50 76 5[21 42 1[42 1[42
1[42 42 42 42 21 21 25 1[44 5[66 42 36[{TeXBase1Encoding ReEncodeFont}
53 74.7198 /Helvetica rf /Fs 133[37 42 42 60 42 46 28
32 37 1[46 42 46 69 23 46 1[23 46 42 28 37 46 37 46 42
8[60 2[60 55 46 2[51 65 60 1[55 2[32 2[51 55 60 60 55
60 6[28 2[42 42 42 42 42 42 42 42 2[28 3[28 28 37[46
2[{TeXBase1Encoding ReEncodeFont}52 83.022 /Times-Bold
rf /Ft 104[83 2[37 37 24[37 42 42 60 42 42 23 32 28 42
42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37 28 5[51
60 60 78 60 60 51 46 55 1[46 60 60 74 51 2[28 60 60 46
51 60 55 55 60 1[37 3[23 23 42 42 42 42 42 42 42 42 42
42 23 21 28 21 47 1[28 28 28 35[46 46 2[{TeXBase1Encoding ReEncodeFont}
76 83.022 /Times-Roman rf /Fu 135[60 2[66 33 60 40 1[66
66 66 100 27 60 1[27 1[66 1[66 66 60 1[66 9[113 2[73
80 9[33 1[93 73 80 86 86 80 80 6[33 3[66 66 66 66 66
66 46[60 2[{TeXBase1Encoding ReEncodeFont}36 119.552
/Helvetica rf /Fv 140[50 6[22 6[55 3[55 14[72 28[55 1[55
55 3[28 46[{TeXBase1Encoding ReEncodeFont}9 99.6264 /Helvetica-Oblique
rf /Fw 134[103 3[115 57 103 3[115 115 1[46 2[46 115 115
1[115 115 2[115 16[138 2[172 3[57 73[{TeXBase1Encoding ReEncodeFont}16
206.559 /Helvetica rf end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 600dpi
TeXDict begin
%%BeginPaperSize: Letter
/setpagedevice where
{ pop << /PageSize [612 792] >> setpagedevice }
{ /letter where { pop letter } if }
ifelse
%%EndPaperSize
end
%%EndSetup
%%Page: 1 1
TeXDict begin 1 0 bop 0 83 3901 9 v 1546 354 a Fw(Installing)58
b(Python)f(Modules)3285 528 y Fv(Release)29 b(2.5.3)3320
882 y Fu(Greg)34 b(W)-5 b(ard)3186 1237 y Ft(19th)20
b(December)m(,)e(2008)2880 1383 y Fs(Python)h(Softwar)o(e)f(F)n
(oundation)2857 1483 y Ft(Email:)25 b Fr(distutils-sig@p)n(ython.org)
1811 1705 y Fq(Abstract)208 1856 y Fp(This)18 b(document)j(describes)f
(the)g(Python)f(Distrib)o(ution)g(Utilities)f(\(\223Distutils\224\))g
(from)i(the)f(end-user')l(s)h(point-of-vie)n(w)-5 b(,)20
b(describing)208 1947 y(ho)n(w)e(to)g(e)o(xtend)h(the)f(capabilities)g
(of)g(a)g(standard)h(Python)g(installation)f(by)g(b)o(uilding)h(and)f
(installing)g(third-party)h(Python)f(modules)208 2038
y(and)h(e)o(xtensions.)0 2319 y Fu(Contents)0 2504 y
Fs(1)83 b(Intr)o(oduction)3281 b(2)125 2604 y Ft(1.1)85
b(Best)22 b(case:)k(tri)n(vial)20 b(installation)65 b(.)42
b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)
f(.)g(.)g(.)143 b(2)125 2703 y(1.2)85 b(The)20 b(ne)n(w)g(standard:)k
(Distutils)33 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h
(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)
g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(2)0 2886 y
Fs(2)83 b(Standard)19 b(Build)j(and)f(Install)2785 b(3)125
2986 y Ft(2.1)85 b(Platform)20 b(v)n(ariations)63 b(.)41
b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(3)125 3085 y(2.2)85
b(Splitting)20 b(the)h(job)e(up)62 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)
f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g
(.)143 b(3)125 3185 y(2.3)85 b(Ho)n(w)21 b(b)n(uilding)d(w)o(orks)23
b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(4)125 3284
y(2.4)85 b(Ho)n(w)21 b(installation)e(w)o(orks)54 b(.)41
b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g
(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)
g(.)g(.)h(.)f(.)g(.)g(.)143 b(4)0 3467 y Fs(3)83 b(Alter)o(nate)19
b(Installation)2970 b(5)125 3567 y Ft(3.1)85 b(Alternate)20
b(installation:)25 b(the)20 b(home)f(scheme)62 b(.)41
b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h
(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143
b(5)125 3666 y(3.2)85 b(Alternate)20 b(installation:)27
b(U)t Fo(N)t(I)t(X)c Ft(\(the)d(pre\002x)f(scheme\))31
b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(6)125
3766 y(3.3)85 b(Alternate)20 b(installation:)25 b(W)m(indo)n(ws)20
b(\(the)f(pre\002x)h(scheme\))37 b(.)k(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f
(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)
143 b(7)0 3949 y Fs(4)83 b(Custom)20 b(Installation)3029
b(7)125 4048 y Ft(4.1)85 b(Modifying)18 b(Python')-5
b(s)20 b(Search)f(P)o(ath)57 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)
f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(9)0 4231
y Fs(5)83 b(Distutils)21 b(Con\002guration)d(Files)2692
b(10)125 4331 y Ft(5.1)85 b(Location)19 b(and)h(names)g(of)g(con\002g)f
(\002les)54 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)
f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g
(.)h(.)f(.)g(.)g(.)102 b(10)125 4430 y(5.2)85 b(Syntax)20
b(of)g(con\002g)f(\002les)56 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h
(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102
b(11)0 4613 y Fs(6)83 b(Building)21 b(Extensions:)k(T)o(ips)c(and)g(T)
-6 b(ricks)2376 b(12)125 4712 y Ft(6.1)85 b(T)-7 b(weaking)20
b(compiler/link)o(er)d(\003ags)41 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(12)125
4812 y(6.2)85 b(Using)21 b(non-Microsoft)c(compilers)i(on)h(W)m(indo)n
(ws)88 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h
(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102
b(13)315 4912 y(Borland)20 b(C)659 4905 y(++)830 4912
y(.)41 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102
b(13)315 5011 y(GNU)21 b(C)g(/)g(Cygwin)f(/)h(MinGW)k(.)41
b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f
(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)
h(.)f(.)g(.)g(.)102 b(14)p 0 5158 V eop end
%%Page: 2 2
TeXDict begin 2 1 bop 0 86 a Fu(1)120 b(Introduction)0
319 y Ft(Although)23 b(Python')-5 b(s)25 b(e)o(xtensi)n(v)o(e)f
(standard)g(library)g(co)o(v)o(ers)g(man)o(y)g(programming)d(needs,)26
b(there)f(often)f(comes)h(a)h(time)f(when)f(you)0 419
y(need)j(to)h(add)f(some)g(ne)n(w)h(functionality)d(to)j(your)f(Python)
f(installation)i(in)f(the)h(form)f(of)g(third-party)e(modules.)47
b(This)28 b(might)f(be)0 518 y(necessary)20 b(to)h(support)e(your)g(o)n
(wn)h(programming,)d(or)k(to)f(support)g(an)g(application)f(that)i(you)
f(w)o(ant)g(to)h(use)g(and)f(that)h(happens)e(to)i(be)0
618 y(written)f(in)g(Python.)0 765 y(In)25 b(the)h(past,)h(there)e(has)
h(been)f(little)h(support)e(for)h(adding)f(third-party)f(modules)i(to)g
(an)h(e)o(xisting)f(Python)f(installation.)41 b(W)m(ith)26
b(the)0 865 y(introduction)18 b(of)i(the)g(Python)f(Distrib)n(ution)g
(Utilities)j(\(Distutils)e(for)g(short\))f(in)i(Python)e(2.0,)g(this)i
(changed.)0 1011 y(This)f(document)d(is)j(aimed)f(primarily)f(at)i(the)
f(people)f(who)h(need)g(to)h(install)g(third-party)d(Python)h(modules:)
23 b(end-users)c(and)f(system)0 1111 y(administrators)i(who)h(just)h
(need)f(to)h(get)f(some)g(Python)g(application)f(running,)f(and)i(e)o
(xisting)g(Python)f(programmers)f(who)i(w)o(ant)g(to)0
1211 y(add)c(some)g(ne)n(w)h(goodies)e(to)i(their)f(toolbox.)23
b(Y)-9 b(ou)17 b(don')o(t)f(need)h(to)g(kno)n(w)g(Python)f(to)i(read)f
(this)h(document;)f(there)g(will)h(be)g(some)f(brief)0
1310 y(forays)h(into)i(using)e(Python')-5 b(s)19 b(interacti)n(v)o(e)f
(mode)h(to)g(e)o(xplore)f(your)g(installation,)h(b)n(ut)g(that')-5
b(s)20 b(it.)26 b(If)19 b(you')l(re)f(looking)f(for)i(information)0
1410 y(on)28 b(ho)n(w)f(to)h(distrib)n(ute)g(your)e(o)n(wn)i(Python)e
(modules)h(so)i(that)f(others)f(may)h(use)g(them,)h(see)g(the)f
Fn(Distrib)n(uting)f(Python)g(Modules)0 1510 y Ft(manual.)0
1794 y Fm(1.1)100 b(Best)28 b(case:)35 b(tr)q(ivial)28
b(installation)0 1997 y Ft(In)d(the)g(best)h(case,)h(someone)d(will)i
(ha)n(v)o(e)f(prepared)e(a)j(special)f(v)o(ersion)f(of)h(the)h(module)e
(distrib)n(ution)g(you)g(w)o(ant)i(to)f(install)h(that)g(is)0
2097 y(tar)o(geted)i(speci\002cally)g(at)i(your)e(platform)f(and)i(is)h
(installed)f(just)g(lik)o(e)h(an)o(y)e(other)g(softw)o(are)h(on)g(your)
e(platform.)51 b(F)o(or)28 b(e)o(xample,)0 2197 y(the)23
b(module)e(de)n(v)o(eloper)f(might)i(mak)o(e)g(an)h(e)o(x)o(ecutable)e
(installer)h(a)n(v)n(ailable)g(for)h(W)m(indo)n(ws)f(users,)h(an)f(RPM)
i(package)d(for)h(users)h(of)0 2296 y(RPM-based)17 b(Linux)f(systems)i
(\(Red)f(Hat,)h(SuSE,)f(Mandrak)o(e,)f(and)h(man)o(y)f(others\),)g(a)i
(Debian)f(package)f(for)g(users)i(of)f(Debian-based)0
2396 y(Linux)i(systems,)i(and)e(so)i(forth.)0 2543 y(In)g(that)h(case,)
h(you)d(w)o(ould)h(do)n(wnload)f(the)i(installer)g(appropriate)d(to)j
(your)e(platform)h(and)g(do)g(the)h(ob)o(vious)e(thing)h(with)h(it:)29
b(run)21 b(it)h(if)0 2642 y(it')-5 b(s)24 b(an)f(e)o(x)o(ecutable)e
(installer)m(,)i Fl(rpm)50 b(--install)22 b Ft(it)h(if)h(it')-5
b(s)24 b(an)f(RPM,)g(etc.)34 b(Y)-9 b(ou)23 b(don')o(t)e(need)h(to)i
(run)e(Python)g(or)g(a)i(setup)f(script,)0 2742 y(you)g(don')o(t)f
(need)i(to)g(compile)f(an)o(ything\227you)d(might)j(not)h(e)n(v)o(en)f
(need)g(to)h(read)f(an)o(y)h(instructions)e(\(although)g(it')-5
b(s)25 b(al)o(w)o(ays)g(a)f(good)0 2842 y(idea)c(to)g(do)g(so)h(an)o
(yw)o(ays\).)0 2988 y(Of)28 b(course,)h(things)e(will)h(not)g(al)o(w)o
(ays)g(be)g(that)g(easy)-5 b(.)47 b(Y)-9 b(ou)27 b(might)g(be)h
(interested)f(in)h(a)g(module)e(distrib)n(ution)h(that)h(doesn')o(t)e
(ha)n(v)o(e)0 3088 y(an)g(easy-to-use)f(installer)i(for)e(your)g
(platform.)42 b(In)26 b(that)g(case,)i(you')o(ll)e(ha)n(v)o(e)f(to)i
(start)g(with)f(the)h(source)e(distrib)n(ution)g(released)h(by)0
3188 y(the)31 b(module')-5 b(s)31 b(author/maintainer)-5
b(.)55 b(Installing)31 b(from)f(a)i(source)e(distrib)n(ution)g(is)j
(not)e(too)g(hard,)i(as)f(long)e(as)i(the)f(modules)g(are)0
3287 y(packaged)c(in)i(the)g(standard)f(w)o(ay)-5 b(.)52
b(The)28 b(b)n(ulk)h(of)g(this)g(document)e(is)k(about)d(b)n(uilding)f
(and)i(installing)g(modules)f(from)g(standard)0 3387
y(source)19 b(distrib)n(utions.)0 3672 y Fm(1.2)100 b(The)28
b(ne)n(w)h(standard:)35 b(Distutils)0 3875 y Ft(If)27
b(you)f(do)n(wnload)f(a)i(module)e(source)i(distrib)n(ution,)g(you)f
(can)g(tell)i(pretty)e(quickly)g(if)h(it)g(w)o(as)h(packaged)d(and)i
(distrib)n(uted)e(in)j(the)0 3974 y(standard)21 b(w)o(ay)-5
b(,)23 b(i.e.)32 b(using)21 b(the)i(Distutils.)33 b(First,)23
b(the)g(distrib)n(ution')-5 b(s)21 b(name)h(and)g(v)o(ersion)f(number)g
(will)i(be)f(featured)f(prominently)0 4074 y(in)32 b(the)g(name)f(of)h
(the)f(do)n(wnloaded)e(archi)n(v)o(e,)k(e.g.)60 b(`)p
Fr(f)n(oo-1.0.tar)l(.gz)p Ft(')28 b(or)j(`)p Fr(widget-0.9.7.zip)p
Ft('.)55 b(Ne)o(xt,)34 b(the)e(archi)n(v)o(e)f(will)h(unpack)0
4174 y(into)22 b(a)h(similarly-named)e(directory:)28
b(`)p Fr(f)n(oo-1.0)p Ft(')20 b(or)i(`)p Fr(widget-0.9.7)p
Ft('.)28 b(Additionally)-5 b(,)20 b(the)j(distrib)n(ution)e(will)j
(contain)d(a)i(setup)g(script)0 4273 y(`)p Fr(setup)m(.p)n(y)p
Ft(',)k(and)g(a)h(\002le)f(named)g(`)p Fr(README.txt)p
Ft(')f(or)h(possibly)g(just)g(`)p Fr(README)p Ft(',)g(which)g(should)f
(e)o(xplain)g(that)h(b)n(uilding)f(and)h(in-)0 4373 y(stalling)20
b(the)g(module)f(distrib)n(ution)g(is)i(a)g(simple)f(matter)g(of)g
(running)236 4611 y Fk(python)44 b(setup.py)g(install)0
4898 y Ft(If)22 b(all)g(these)g(things)f(are)h(true,)f(then)g(you)g
(already)g(kno)n(w)f(ho)n(w)i(to)f(b)n(uild)h(and)f(install)h(the)g
(modules)e(you')l(v)o(e)g(just)i(do)n(wnloaded:)k(Run)0
4997 y(the)18 b(command)e(abo)o(v)o(e.)23 b(Unless)18
b(you)f(need)h(to)g(install)g(things)g(in)g(a)h(non-standard)c(w)o(ay)j
(or)f(customize)h(the)g(b)n(uild)f(process,)h(you)f(don')o(t)0
5097 y(really)j(need)f(this)i(manual.)j(Or)c(rather)m(,)f(the)h(abo)o
(v)o(e)f(command)f(is)j(e)n(v)o(erything)d(you)h(need)g(to)i(get)f(out)
g(of)g(this)g(manual.)p 0 5549 3901 4 v 0 5649 a Fj(2)3291
b(1)83 b(Introduction)p eop end
%%Page: 3 3
TeXDict begin 3 2 bop 0 88 a Fu(2)120 b(Standard)35 b(Build)e(and)i
(Install)0 321 y Ft(As)29 b(described)e(in)i(section)f(1.2,)i(b)n
(uilding)d(and)h(installing)g(a)h(module)e(distrib)n(ution)g(using)h
(the)g(Distutils)i(is)f(usually)f(one)g(simple)0 421
y(command:)236 659 y Fk(python)44 b(setup.py)g(install)0
945 y Ft(On)24 b(U)t Fo(N)t(I)t(X)r Ft(,)f(you')l(d)d(run)h(this)h
(command)e(from)h(a)h(shell)g(prompt;)f(on)h(W)m(indo)n(ws,)f(you)g(ha)
n(v)o(e)g(to)h(open)f(a)h(command)e(prompt)h(windo)n(w)0
1045 y(\(\223DOS)f(box\224\))f(and)h(do)g(it)g(there;)g(on)g(Mac)g(OS)h
(X,)g(you)e(open)g(a)i Fl(Terminal)e Ft(windo)n(w)g(to)h(get)h(a)f
(shell)h(prompt.)0 1329 y Fm(2.1)100 b(Platf)m(or)r(m)29
b(v)n(ar)q(iations)0 1532 y Ft(Y)-9 b(ou)27 b(should)g(al)o(w)o(ays)h
(run)f(the)h(setup)f(command)f(from)g(the)i(distrib)n(ution)f(root)g
(directory)-5 b(,)27 b(i.e.)47 b(the)28 b(top-le)n(v)o(el)e
(subdirectory)f(that)0 1631 y(the)i(module)e(source)h(distrib)n(ution)g
(unpacks)g(into.)44 b(F)o(or)27 b(e)o(xample,)g(if)g(you')l(v)o(e)d
(just)k(do)n(wnloaded)c(a)j(module)f(source)g(distrib)n(ution)0
1731 y(`)p Fr(f)n(oo-1.0.tar)l(.gz)p Ft(')16 b(onto)k(a)i(U)t
Fo(N)t(I)t(X)h Ft(system,)e(the)f(normal)f(thing)g(to)i(do)e(is:)236
1969 y Fk(gunzip)44 b(-c)h(foo-1.0.tar.gz)d(|)j(tar)f(xf)h(-)179
b(#)44 b(unpacks)g(into)g(directory)f(foo-1.0)236 2060
y(cd)i(foo-1.0)236 2152 y(python)f(setup.py)g(install)0
2438 y Ft(On)22 b(W)m(indo)n(ws,)f(you')l(d)f(probably)g(do)n(wnload)g
(`)p Fr(f)n(oo-1.0.zip)p Ft('.)26 b(If)c(you)f(do)n(wnloaded)e(the)j
(archi)n(v)o(e)f(\002le)h(to)g(`)p Fr(C:)p Fi(n)p Fr(T)-9
b(emp)p Ft(',)21 b(then)h(it)g(w)o(ould)0 2538 y(unpack)29
b(into)h(`)p Fr(C:)p Fi(n)p Fr(T)-9 b(emp)p Fi(n)p Fr(f)n(oo-1.0)p
Ft(';)32 b(you)e(can)g(use)g(either)g(a)h(archi)n(v)o(e)e(manipulator)f
(with)j(a)f(graphical)f(user)i(interf)o(ace)e(\(such)h(as)0
2637 y(W)m(inZip\))23 b(or)g(a)g(command-line)e(tool)i(\(such)g(as)h
Fs(unzip)g Ft(or)f Fs(pkunzip)p Ft(\))i(to)e(unpack)f(the)h(archi)n(v)o
(e.)34 b(Then,)23 b(open)f(a)i(command)d(prompt)0 2737
y(windo)n(w)e(\(\223DOS)h(box\224\),)f(and)h(run:)236
2975 y Fk(cd)45 b(c:\\Temp\\foo-1.0)236 3067 y(python)f(setup.py)g
(install)0 3490 y Fm(2.2)100 b(Splitting)29 b(the)f(job)h(up)0
3693 y Ft(Running)c Fl(setup.py)49 b(install)26 b Ft(b)n(uilds)g(and)h
(installs)g(all)h(modules)d(in)i(one)f(run.)44 b(If)27
b(you)f(prefer)f(to)i(w)o(ork)f(incrementally\227)0 3793
y(especially)17 b(useful)h(if)g(you)f(w)o(ant)h(to)f(customize)g(the)h
(b)n(uild)g(process,)f(or)h(if)g(things)f(are)h(going)e(wrong\227you)f
(can)j(use)g(the)g(setup)g(script)0 3892 y(to)24 b(do)f(one)g(thing)f
(at)i(a)g(time.)35 b(This)24 b(is)g(particularly)e(helpful)g(when)h
(the)h(b)n(uild)f(and)g(install)h(will)g(be)f(done)g(by)g(dif)n(ferent)
f(users\227for)0 3992 y(e)o(xample,)h(you)f(might)h(w)o(ant)h(to)g(b)n
(uild)f(a)h(module)e(distrib)n(ution)h(and)g(hand)f(it)j(of)n(f)e(to)g
(a)h(system)g(administrator)e(for)h(installation)g(\(or)0
4092 y(do)d(it)h(yourself,)d(with)j(super)n(-user)e(pri)n(vile)o
(ges\).)0 4239 y(F)o(or)i(e)o(xample,)e(you)h(can)h(b)n(uild)g(e)n(v)o
(erything)d(in)j(one)f(step,)i(and)e(then)h(install)g(e)n(v)o(erything)
d(in)k(a)f(second)f(step,)h(by)g(in)m(v)n(oking)e(the)i(setup)0
4338 y(script)f(twice:)236 4576 y Fk(python)44 b(setup.py)g(build)236
4668 y(python)g(setup.py)g(install)0 4954 y Ft(If)24
b(you)e(do)i(this,)g(you)f(will)i(notice)e(that)h(running)d(the)j
Fl(install)f Ft(command)e(\002rst)k(runs)e(the)h Fl(build)f
Ft(command,)f(which\227in)h(this)0 5054 y(case\227quickly)c(notices)h
(that)g(it)h(has)f(nothing)f(to)h(do,)g(since)g(e)n(v)o(erything)e(in)i
(the)g(`)p Fr(b)o(uild)p Ft(')d(directory)i(is)i(up-to-date.)0
5201 y(Y)-9 b(ou)21 b(may)g(not)g(need)g(this)h(ability)g(to)g(break)e
(things)h(do)n(wn)g(often)g(if)g(all)i(you)d(do)i(is)g(install)g
(modules)f(do)n(wnloaded)e(of)n(f)i(the)g('net,)h(b)n(ut)0
5300 y(it')-5 b(s)22 b(v)o(ery)e(handy)f(for)i(more)f(adv)n(anced)f
(tasks.)28 b(If)21 b(you)f(get)h(into)g(distrib)n(uting)e(your)h(o)n
(wn)h(Python)e(modules)h(and)h(e)o(xtensions,)e(you')o(ll)0
5400 y(run)g(lots)i(of)f(indi)n(vidual)e(Distutils)k(commands)c(on)i
(their)g(o)n(wn.)p 0 5549 3901 4 v 3854 5649 a Fj(3)p
eop end
%%Page: 4 4
TeXDict begin 4 3 bop 0 83 a Fm(2.3)100 b(Ho)o(w)28 b(b)n(uilding)i(w)o
(or)q(ks)0 286 y Ft(As)20 b(implied)f(abo)o(v)o(e,)e(the)i
Fl(build)g Ft(command)e(is)k(responsible)d(for)g(putting)g(the)i
(\002les)g(to)f(install)h(into)f(a)h Fn(b)n(uild)e(dir)m(ectory)p
Ft(.)25 b(By)20 b(def)o(ault,)0 386 y(this)k(is)g(`)p
Fr(b)o(uild)p Ft(')c(under)i(the)h(distrib)n(ution)f(root;)i(if)f(you')
l(re)e(e)o(xcessi)n(v)o(ely)h(concerned)f(with)i(speed,)g(or)g(w)o(ant)
g(to)h(k)o(eep)e(the)h(source)g(tree)0 485 y(pristine,)d(you)f(can)h
(change)f(the)h(b)n(uild)g(directory)e(with)j(the)f Fs(--b)n(uild-base)
g Ft(option.)k(F)o(or)c(e)o(xample:)236 723 y Fk(python)44
b(setup.py)g(build)g(--build-base=/tmp/pybuild/foo-1.0)0
1010 y Ft(\(Or)15 b(you)g(could)f(do)h(this)h(permanently)d(with)i(a)h
(directi)n(v)o(e)e(in)i(your)e(system)h(or)g(personal)f(Distutils)j
(con\002guration)12 b(\002le;)18 b(see)e(section)f(5.\))0
1110 y(Normally)-5 b(,)18 b(this)j(isn')o(t)f(necessary)-5
b(.)0 1256 y(The)20 b(def)o(ault)f(layout)h(for)f(the)h(b)n(uild)g
(tree)g(is)i(as)e(follo)n(ws:)236 1495 y Fk(---)45 b(build/)e(---)i
(lib/)236 1586 y(or)236 1677 y(---)g(build/)e(---)i(lib.<plat>/)909
1769 y(temp.<plat>/)0 2055 y Ft(where)17 b Fl(<plat>)g
Ft(e)o(xpands)e(to)j(a)g(brief)e(description)g(of)h(the)h(current)e
(OS/hardw)o(are)g(platform)g(and)h(Python)f(v)o(ersion.)23
b(The)17 b(\002rst)h(form,)0 2155 y(with)i(just)h(a)g(`)p
Fr(lib)p Ft(')d(directory)-5 b(,)18 b(is)j(used)f(for)f(\223pure)h
(module)e(distrib)n(utions\224\227that)h(is,)i(module)e(distrib)n
(utions)g(that)h(include)f(only)g(pure)0 2254 y(Python)h(modules.)27
b(If)21 b(a)g(module)f(distrib)n(ution)g(contains)g(an)o(y)g(e)o
(xtensions)g(\(modules)g(written)h(in)g(C/C)3013 2247
y(++)3108 2254 y(\),)g(then)g(the)g(second)f(form,)0
2354 y(with)k(tw)o(o)h Fl(<plat>)f Ft(directories,)g(is)h(used.)37
b(In)24 b(that)h(case,)g(the)g(`)p Fr(temp)m(.)p Fh(plat)7
b Ft(')21 b(directory)i(holds)h(temporary)e(\002les)j(generated)e(by)h
(the)0 2454 y(compile/link)16 b(process)h(that)h(don')o(t)e(actually)i
(get)f(installed.)25 b(In)17 b(either)g(case,)i(the)f(`)p
Fr(lib)p Ft(')e(\(or)h(`)p Fr(lib)m(.)p Fh(plat)7 b Ft('\))14
b(directory)i(contains)h(all)i(Python)0 2553 y(modules)g(\(pure)g
(Python)g(and)h(e)o(xtensions\))e(that)j(will)g(be)f(installed.)0
2700 y(In)c(the)g(future,)g(more)f(directories)g(will)i(be)g(added)e
(to)h(handle)f(Python)g(scripts,)i(documentation,)d(binary)h(e)o(x)o
(ecutables,)g(and)h(whate)n(v)o(er)0 2800 y(else)21 b(is)g(needed)e(to)
h(handle)f(the)h(job)g(of)g(installing)g(Python)f(modules)g(and)h
(applications.)0 3085 y Fm(2.4)100 b(Ho)o(w)28 b(installation)h(w)o(or)
q(ks)0 3288 y Ft(After)21 b(the)g Fl(build)g Ft(command)e(runs)i
(\(whether)f(you)g(run)g(it)i(e)o(xplicitly)-5 b(,)20
b(or)h(the)g Fl(install)g Ft(command)e(does)i(it)h(for)e(you\),)g(the)h
(w)o(ork)0 3387 y(of)h(the)g Fl(install)f Ft(command)g(is)i(relati)n(v)
o(ely)e(simple:)29 b(all)22 b(it)h(has)g(to)f(do)g(is)h(cop)o(y)e(e)n
(v)o(erything)e(under)i(`)p Fr(b)o(uild/lib)p Ft(')d(\(or)j(`)p
Fr(b)o(uild/lib)m(.)p Fh(plat)7 b Ft(')o(\))0 3487 y(to)20
b(your)f(chosen)h(installation)f(directory)-5 b(.)0 3634
y(If)22 b(you)f(don')o(t)f(choose)h(an)g(installation)h
(directory\227i.e.,)e(if)i(you)f(just)h(run)f Fl(setup.py)48
b(install)p Ft(\227then)20 b(the)i Fl(install)f Ft(com-)0
3733 y(mand)j(installs)i(to)f(the)h(standard)e(location)g(for)g
(third-party)f(Python)h(modules.)39 b(This)25 b(location)f(v)n(aries)h
(by)g(platform)f(and)g(by)h(ho)n(w)0 3833 y(you)f(b)n(uilt/installed)g
(Python)f(itself.)39 b(On)26 b(U)t Fo(N)t(I)t(X)i Ft(\(and)23
b(Mac)i(OS)g(X,)g(which)f(is)i(also)g(U)t Fo(N)t(I)t(X)r
Ft(-based\),)f(it)g(also)g(depends)e(on)i(whether)0 3933
y(the)20 b(module)f(distrib)n(ution)g(being)g(installed)h(is)h(pure)f
(Python)f(or)h(contains)f(e)o(xtensions)g(\(\223non-pure\224\):)160
4142 y Fs(Platf)n(orm)p 779 4172 4 100 v 352 w(Standard)h(installation)
g(location)p 2169 4172 V 336 w(Default)g(v)o(alue)p 3490
4172 V 848 w(Notes)p 111 4175 3679 4 v 162 4245 a Ft(U)t
Fo(N)t(I)t(X)k Ft(\(pure\))p 779 4275 4 100 v 249 w Fh(pre\002x)7
b Fr(/lib/p)n(ython2.5/site-pa)o(c)o(kage)o(s)p 2169
4275 V 272 w(/usr/local/lib/p)n(ython2.5)o(/site)o(-pa)o(c)o(kage)o(s)p
3490 4275 V 145 w Ft(\(1\))162 4345 y(U)t Fo(N)t(I)t(X)24
b Ft(\(non-pure\))p 779 4375 V 95 w Fh(e)n(x)n(ec-pre\002x)7
b Fr(/lib/p)n(ython2.5/site)o(-pa)o(c)o(kage)o(s)p 2169
4375 V 94 w(/usr/local/lib/p)n(ython2.5)o(/site)o(-pa)o(c)o(kage)o(s)p
3490 4375 V 145 w Ft(\(1\))160 4444 y(W)m(indo)n(ws)p
779 4474 V 356 w Fh(pre\002x)p 2169 4474 V 1207 w Fr(C:)p
Fi(n)p Fr(Python)p 3490 4474 V 1025 w Ft(\(2\))0 4652
y(Notes:)0 4865 y Fs(\(1\))40 b Ft(Most)27 b(Linux)f(distrib)n(utions)g
(include)g(Python)g(as)h(a)h(standard)e(part)g(of)h(the)g(system,)h(so)
f Fh(pre\002x)35 b Ft(and)26 b Fh(e)n(x)n(ec-pre\002x)33
b Ft(are)27 b(usually)208 4965 y(both)22 b(`)p Fr(/usr)p
Ft(')h(on)g(Linux.)34 b(If)23 b(you)f(b)n(uild)h(Python)g(yourself)f
(on)h(Linux)f(\(or)h(an)o(y)i(U)t Fo(N)t(I)t(X)r Ft(-lik)o(e)e
(system\),)h(the)g(def)o(ault)e Fh(pre\002x)31 b Ft(and)208
5064 y Fh(e)n(x)n(ec-pre\002x)26 b Ft(are)20 b(`)p Fr(/usr/local)p
Ft('.)0 5230 y Fs(\(2\))40 b Ft(The)29 b(def)o(ault)g(installation)g
(directory)f(on)h(W)m(indo)n(ws)f(w)o(as)j(`)p Fr(C:)p
Fi(n)p Fr(Prog)o(r)o(am)d(Files)p Fi(n)p Fr(Python)p
Ft(')g(under)g(Python)g(1.6a1,)i(1.5.2,)g(and)208 5330
y(earlier)-5 b(.)p 0 5549 3901 4 v 0 5649 a Fj(4)2779
b(2)83 b(Standard)24 b(Build)h(and)e(Install)p eop end
%%Page: 5 5
TeXDict begin 5 4 bop 0 83 a Fh(pre\002x)31 b Ft(and)24
b Fh(e)n(x)n(ec-pre\002x)30 b Ft(stand)24 b(for)g(the)g(directories)f
(that)h(Python)f(is)i(installed)f(to,)h(and)f(where)f(it)i(\002nds)f
(its)h(libraries)f(at)g(run-time.)0 183 y(The)o(y)i(are)g(al)o(w)o(ays)
i(the)e(same)h(under)e(W)m(indo)n(ws,)j(and)e(v)o(ery)g(often)g(the)g
(same)h(under)h(U)t Fo(N)t(I)t(X)h Ft(and)e(Mac)f(OS)i(X.)f(Y)-9
b(ou)26 b(can)g(\002nd)h(out)0 282 y(what)22 b(your)e(Python)h
(installation)g(uses)h(for)f Fh(pre\002x)29 b Ft(and)21
b Fh(e)n(x)n(ec-pre\002x)29 b Ft(by)21 b(running)e(Python)i(in)h
(interacti)n(v)o(e)e(mode)h(and)g(typing)g(a)h(fe)n(w)0
382 y(simple)e(commands.)j(Under)d(U)t Fo(N)t(I)t(X)r
Ft(,)h(just)f(type)f Fl(python)h Ft(at)g(the)f(shell)h(prompt.)k(Under)
18 b(W)m(indo)n(ws,)h(choose)g Fj(Star)s(t)46 b Fg(>)22
b Fj(Prog)o(r)o(ams)0 482 y Fg(>)i Fj(Python)h(2.5)h
Fg(>)e Fj(Python)h(\(command)g(line\))p Ft(.)31 b(Once)21
b(the)h(interpreter)e(is)i(started,)g(you)f(type)g(Python)f(code)h(at)h
(the)g(prompt.)28 b(F)o(or)0 581 y(e)o(xample,)22 b(on)g(my)h(Linux)f
(system,)h(I)h(type)e(the)h(three)f(Python)g(statements)h(sho)n(wn)f
(belo)n(w)-5 b(,)23 b(and)f(get)h(the)g(output)f(as)h(sho)n(wn,)g(to)g
(\002nd)0 681 y(out)d(my)g Fh(pre\002x)27 b Ft(and)20
b Fh(e)n(x)n(ec-pre\002x)7 b Ft(:)236 828 y Fk(Python)44
b(2.4)g(\(#26,)g(Aug)90 b(7)44 b(2004,)g(17:19:02\))236
919 y(Type)g("help",)g("copyright",)f("credits")g(or)i("license")e(for)
h(more)g(information.)236 1010 y(>>>)h(import)e(sys)236
1102 y(>>>)i(sys.prefix)236 1193 y('/usr')236 1284 y(>>>)g
(sys.exec_prefix)236 1376 y('/usr')0 1662 y Ft(If)22
b(you)f(don')o(t)f(w)o(ant)j(to)f(install)g(modules)f(to)h(the)h
(standard)d(location,)i(or)f(if)i(you)e(don')o(t)f(ha)n(v)o(e)i
(permission)f(to)h(write)g(there,)g(then)f(you)0 1762
y(need)28 b(to)h(read)f(about)f(alternate)i(installations)f(in)h
(section)f(3.)51 b(If)28 b(you)g(w)o(ant)h(to)f(customize)g(your)g
(installation)g(directories)f(more)0 1861 y(hea)n(vily)-5
b(,)19 b(see)i(section)f(4)g(on)g(custom)f(installations.)0
2189 y Fu(3)120 b(Alter)s(nate)35 b(Installation)0 2422
y Ft(Often,)17 b(it)g(is)h(necessary)e(or)g(desirable)g(to)h(install)g
(modules)f(to)h(a)g(location)e(other)h(than)g(the)h(standard)f
(location)f(for)h(third-party)f(Python)0 2521 y(modules.)28
b(F)o(or)22 b(e)o(xample,)e(on)h(a)j(U)t Fo(N)t(I)t(X)h
Ft(system)d(you)f(might)g(not)g(ha)n(v)o(e)g(permission)g(to)h(write)g
(to)f(the)h(standard)f(third-party)e(module)0 2621 y(directory)-5
b(.)35 b(Or)25 b(you)e(might)h(wish)g(to)h(try)f(out)g(a)h(module)e
(before)g(making)g(it)i(a)f(standard)g(part)g(of)g(your)f(local)h
(Python)f(installation.)0 2720 y(This)k(is)g(especially)f(true)g(when)g
(upgrading)d(a)k(distrib)n(ution)e(already)h(present:)37
b(you)25 b(w)o(ant)i(to)f(mak)o(e)g(sure)h(your)e(e)o(xisting)g(base)i
(of)0 2820 y(scripts)21 b(still)g(w)o(orks)f(with)g(the)g(ne)n(w)g(v)o
(ersion)f(before)g(actually)h(upgrading.)0 2967 y(The)h(Distutils)i
Fl(install)d Ft(command)g(is)i(designed)e(to)i(mak)o(e)f(installing)g
(module)f(distrib)n(utions)g(to)i(an)f(alternate)g(location)g(simple)0
3067 y(and)e(painless.)24 b(The)19 b(basic)h(idea)f(is)h(that)g(you)e
(supply)g(a)i(base)f(directory)f(for)h(the)g(installation,)g(and)g(the)
g Fl(install)f Ft(command)g(picks)0 3166 y(a)k(set)g(of)e(directories)h
(\(called)f(an)h Fn(installation)f(sc)o(heme)p Ft(\))h(under)e(this)j
(base)f(directory)f(in)h(which)g(to)g(install)h(\002les.)28
b(The)21 b(details)h(dif)n(fer)0 3266 y(across)e(platforms,)f(so)i
(read)e(whiche)n(v)o(er)f(of)i(the)g(follo)n(wing)f(sections)h(applies)
g(to)h(you.)0 3551 y Fm(3.1)100 b(Alter)r(nate)30 b(installation:)36
b(the)28 b(home)h(scheme)0 3754 y Ft(The)18 b(idea)h(behind)e(the)i
(\223home)e(scheme\224)h(is)i(that)f(you)f(b)n(uild)g(and)g(maintain)g
(a)h(personal)e(stash)j(of)e(Python)f(modules.)24 b(This)19
b(scheme')-5 b(s)0 3853 y(name)24 b(is)i(deri)n(v)o(ed)d(from)g(the)i
(idea)g(of)f(a)h(\223home\224)f(directory)f(on)j(U)t
Fo(N)t(I)t(X)r Ft(,)h(since)d(it')-5 b(s)26 b(not)f(unusual)e(for)h(a)j
(U)t Fo(N)t(I)t(X)h Ft(user)d(to)g(mak)o(e)f(their)0
3953 y(home)e(directory)g(ha)n(v)o(e)h(a)h(layout)e(similar)i(to)f(`)p
Fr(/usr/)p Ft(')g(or)g(`)p Fr(/usr/local/)p Ft('.)32
b(This)23 b(scheme)g(can)g(be)h(used)f(by)g(an)o(yone,)f(re)o(gardless)
f(of)j(the)0 4053 y(operating)18 b(system)j(their)f(installing)f(for)-5
b(.)0 4199 y(Installing)19 b(a)i(ne)n(w)f(module)f(distrib)n(ution)g
(is)i(as)g(simple)f(as)236 4438 y Fk(python)44 b(setup.py)g(install)f
(--home=<dir>)0 4724 y Ft(where)23 b(you)g(can)h(supply)f(an)o(y)g
(directory)f(you)h(lik)o(e)h(for)f(the)h Fs(--home)g
Ft(option.)34 b(On)26 b(U)t Fo(N)t(I)t(X)r Ft(,)g(lazy)e(typists)g(can)
g(just)g(type)f(a)i(tilde)f(\()p Fl(\230)p Ft(\);)0 4824
y(the)c Fl(install)g Ft(command)e(will)j(e)o(xpand)d(this)j(to)f(your)f
(home)g(directory:)236 5062 y Fk(python)44 b(setup.py)g(install)f
(--home=\230)0 5348 y Ft(The)27 b Fs(--home)g Ft(option)g(de\002nes)g
(the)g(installation)h(base)f(directory)-5 b(.)45 b(Files)29
b(are)e(installed)h(to)f(the)h(follo)n(wing)e(directories)g(under)h
(the)p 0 5549 3901 4 v 3854 5649 a Fj(5)p eop end
%%Page: 6 6
TeXDict begin 6 5 bop 0 83 a Ft(installation)20 b(base)g(as)h(follo)n
(ws:)697 274 y Fs(T)-6 b(ype)21 b(of)e(\002le)p 1717
303 4 100 v 681 w(Installation)h(Dir)o(ectory)p 2583
303 V 97 w(Ov)o(erride)g(option)p 647 307 2606 4 v 697
377 a Ft(pure)f(module)g(distrib)n(ution)p 1717 406 4
100 v 250 w Fh(home)r Fr(/lib/p)n(ython)p 2583 406 V
334 w Fs(--install-pur)o(elib)697 476 y Ft(non-pure)f(module)g(distrib)
n(ution)p 1717 506 V 98 w Fh(home)r Fr(/lib/p)n(ython)p
2583 506 V 334 w Fs(--install-platlib)697 576 y Ft(scripts)p
1717 606 V 854 w Fh(home)r Fr(/bin)p 2583 606 V 554 w
Fs(--install-scripts)697 675 y Ft(data)p 1717 705 V 932
w Fh(home)r Fr(/share)p 2583 705 V 467 w Fs(--install-data)0
882 y Ft(Changed)h(in)h(v)o(ersion)f(2.4:)h(The)g Fs(--home)f
Ft(option)g(used)h(to)h(be)f(supported)e(only)h(on)j(U)t
Fo(N)t(I)t(X)r Ft(.)0 1166 y Fm(3.2)100 b(Alter)r(nate)30
b(installation:)38 b Fe(U)t Ff(N)t(I)t(X)32 b Fm(\(the)c(pre\002x)g
(scheme\))0 1369 y Ft(The)18 b(\223pre\002x)g(scheme\224)g(is)h(useful)
f(when)g(you)f(wish)i(to)g(use)f(one)g(Python)f(installation)h(to)h
(perform)e(the)h(b)n(uild/install)g(\(i.e.,)g(to)h(run)f(the)0
1468 y(setup)i(script\),)g(b)n(ut)g(install)g(modules)g(into)g(the)g
(third-party)e(module)g(directory)h(of)h(a)g(dif)n(ferent)f(Python)g
(installation)h(\(or)f(something)0 1568 y(that)26 b(looks)g(lik)o(e)h
(a)g(dif)n(ferent)e(Python)g(installation\).)43 b(If)26
b(this)h(sounds)e(a)i(tri\003e)g(unusual,)g(it)g(is\227that')-5
b(s)27 b(why)e(the)i(\223home)e(scheme\224)0 1668 y(comes)20
b(\002rst.)26 b(Ho)n(we)n(v)o(er)m(,)18 b(there)h(are)h(at)h(least)g
(tw)o(o)g(kno)n(wn)d(cases)j(where)f(the)g(pre\002x)f(scheme)h(will)h
(be)f(useful.)0 1815 y(First,)28 b(consider)d(that)h(man)o(y)f(Linux)g
(distrib)n(utions)h(put)f(Python)g(in)i(`)p Fr(/usr)p
Ft(',)f(rather)g(than)f(the)i(more)e(traditional)g(`)p
Fr(/usr/local)p Ft('.)40 b(This)0 1914 y(is)29 b(entirely)d
(appropriate,)h(since)h(in)g(those)f(cases)h(Python)f(is)h(part)g(of)f
(\223the)h(system\224)f(rather)g(than)g(a)h(local)g(add-on.)45
b(Ho)n(we)n(v)o(er)m(,)27 b(if)0 2014 y(you)20 b(are)g(installing)h
(Python)e(modules)h(from)g(source,)g(you)f(probably)g(w)o(ant)i(them)f
(to)h(go)f(in)h(`)p Fr(/usr/local/lib/p)n(ython2)o(.)p
Fh(X)9 b Ft(')15 b(rather)20 b(than)0 2113 y(`)p Fr(/usr/lib/p)n
(ython2.)p Fh(X)9 b Ft('.)15 b(This)20 b(can)g(be)h(done)e(with)236
2352 y Fk(/usr/bin/python)43 b(setup.py)g(install)h
(--prefix=/usr/local)0 2638 y Ft(Another)23 b(possibility)h(is)i(a)f
(netw)o(ork)e(\002lesystem)i(where)f(the)g(name)g(used)g(to)h(write)g
(to)f(a)h(remote)f(directory)f(is)i(dif)n(ferent)e(from)h(the)0
2738 y(name)c(used)h(to)g(read)g(it:)27 b(for)20 b(e)o(xample,)g(the)h
(Python)f(interpreter)f(accessed)i(as)g(`)p Fr(/usr/local/bin/p)n
(ython)p Ft(')15 b(might)21 b(search)f(for)h(modules)0
2837 y(in)d(`)p Fr(/usr/local/lib/p)n(ython2)o(.)p Fh(X)9
b Ft(',)j(b)n(ut)18 b(those)f(modules)g(w)o(ould)g(ha)n(v)o(e)g(to)h
(be)f(installed)h(to,)g(say)-5 b(,)18 b(`)p Fr(/mnt/)p
Fh(@ser)r(v)n(er)8 b Fr(/e)n(xpor)s(t/lib/p)n(ython)o(2.)p
Fh(X)g Ft('.)0 2937 y(This)20 b(could)g(be)g(done)f(with)236
3175 y Fk(/usr/local/bin/python)42 b(setup.py)h(install)h
(--prefix=/mnt/@server/export)0 3462 y Ft(In)30 b(either)h(case,)i(the)
e Fs(--pr)o(e\002x)e Ft(option)h(de\002nes)g(the)h(installation)f
(base,)j(and)d(the)h Fs(--exec-pr)o(e\002x)d Ft(option)h(de\002nes)i
(the)f(platform-)0 3562 y(speci\002c)20 b(installation)g(base,)g(which)
g(is)h(used)e(for)h(platform-speci\002c)e(\002les.)26
b(\(Currently)-5 b(,)18 b(this)i(just)h(means)f(non-pure)d(module)i
(distri-)0 3662 y(b)n(utions,)k(b)n(ut)h(could)e(be)h(e)o(xpanded)e(to)
i(C)i(libraries,)e(binary)f(e)o(x)o(ecutables,)g(etc.\))34
b(If)24 b Fs(--exec-pr)o(e\002x)d Ft(is)j(not)f(supplied,)g(it)h(def)o
(aults)e(to)0 3761 y Fs(--pr)o(e\002x)p Ft(.)i(Files)d(are)f(installed)
g(as)h(follo)n(ws:)426 3984 y Fs(T)-6 b(ype)21 b(of)f(\002le)p
1446 4013 V 680 w(Installation)g(Dir)o(ectory)p 2853
4013 V 639 w(Ov)o(erride)g(option)p 377 4017 3147 4 v
426 4086 a Ft(pure)g(module)e(distrib)n(ution)p 1446
4116 4 100 v 250 w Fh(pre\002x)7 b Fr(/lib/p)n(ython2.)p
Fh(X)i Fr(/site-pac)o(kag)o(es)p 2853 4116 V 272 w Fs(--install-pur)o
(elib)426 4186 y Ft(non-pure)18 b(module)h(distrib)n(ution)p
1446 4216 V 97 w Fh(e)n(x)n(ec-pre\002x)7 b Fr(/lib/p)n(ython2.)p
Fh(X)i Fr(/site-pa)o(c)o(kag)o(es)p 2853 4216 V 94 w
Fs(--install-platlib)426 4286 y Ft(scripts)p 1446 4316
V 854 w Fh(pre\002x)e Fr(/bin)p 2853 4316 V 1096 w Fs
(--install-scripts)426 4385 y Ft(data)p 1446 4415 V 932
w Fh(pre\002x)g Fr(/share)p 2853 4415 V 1009 w Fs(--install-data)0
4608 y Ft(There)15 b(is)i(no)e(requirement)e(that)j Fs(--pr)o(e\002x)f
Ft(or)g Fs(--exec-pr)o(e\002x)f Ft(actually)h(point)g(to)h(an)f
(alternate)g(Python)g(installation;)i(if)f(the)g(directories)0
4708 y(listed)21 b(abo)o(v)o(e)d(do)i(not)g(already)f(e)o(xist,)h(the)o
(y)f(are)i(created)e(at)i(installation)f(time.)0 4855
y(Incidentally)-5 b(,)19 b(the)j(real)f(reason)g(the)h(pre\002x)e
(scheme)h(is)i(important)d(is)i(simply)f(that)h(a)g(standard)g(U)t
Fo(N)t(I)t(X)j Ft(installation)c(uses)h(the)f(pre\002x)0
4954 y(scheme,)26 b(b)n(ut)f(with)g Fs(--pr)o(e\002x)f
Ft(and)h Fs(--exec-pr)o(e\002x)d Ft(supplied)i(by)h(Python)f(itself)i
(as)g Fl(sys.prefix)d Ft(and)i Fl(sys.exec_prefix)p Ft(.)0
5054 y(Thus,)e(you)f(might)h(think)f(you')o(ll)g(ne)n(v)o(er)g(use)h
(the)g(pre\002x)g(scheme,)g(b)n(ut)g(e)n(v)o(ery)f(time)h(you)f(run)g
Fl(python)49 b(setup.py)f(install)0 5154 y Ft(without)19
b(an)o(y)h(other)f(options,)g(you')l(re)g(using)g(it.)0
5300 y(Note)24 b(that)g(installing)g(e)o(xtensions)f(to)h(an)h
(alternate)e(Python)g(installation)h(has)g(no)g(ef)n(fect)g(on)f(ho)n
(w)h(those)g(e)o(xtensions)f(are)h(b)n(uilt:)33 b(in)0
5400 y(particular)m(,)21 b(the)i(Python)f(header)f(\002les)j(\(`)p
Fr(Python.h)p Ft(')c(and)i(friends\))g(installed)g(with)h(the)g(Python)
f(interpreter)f(used)h(to)h(run)f(the)h(setup)p 0 5549
3901 4 v 0 5649 a Fj(6)2971 b(3)83 b(Alter)r(nate)24
b(Installation)p eop end
%%Page: 7 7
TeXDict begin 7 6 bop 0 83 a Ft(script)17 b(will)h(be)f(used)g(in)h
(compiling)d(e)o(xtensions.)23 b(It)17 b(is)h(your)e(responsibility)g
(to)i(ensure)e(that)h(the)g(interpreter)f(used)h(to)g(run)g(e)o
(xtensions)0 183 y(installed)j(in)g(this)g(w)o(ay)g(is)h(compatible)d
(with)i(the)g(interpreter)e(used)i(to)g(b)n(uild)f(them.)25
b(The)19 b(best)h(w)o(ay)g(to)g(do)f(this)i(is)g(to)f(ensure)f(that)h
(the)0 282 y(tw)o(o)j(interpreters)f(are)h(the)g(same)g(v)o(ersion)f
(of)g(Python)g(\(possibly)g(dif)n(ferent)f(b)n(uilds,)j(or)e(possibly)h
(copies)f(of)h(the)g(same)g(b)n(uild\).)33 b(\(Of)0 382
y(course,)19 b(if)i(your)e Fs(--pr)o(e\002x)g Ft(and)g
Fs(--exec-pr)o(e\002x)f Ft(don')o(t)h(e)n(v)o(en)g(point)g(to)i(an)f
(alternate)f(Python)g(installation,)h(this)h(is)g(immaterial.\))0
667 y Fm(3.3)100 b(Alter)r(nate)30 b(installation:)36
b(Windo)o(ws)28 b(\(the)g(pre\002x)g(scheme\))0 870 y
Ft(W)m(indo)n(ws)g(has)h(no)g(concept)e(of)i(a)g(user')-5
b(s)29 b(home)f(directory)-5 b(,)28 b(and)h(since)g(the)f(standard)g
(Python)g(installation)g(under)f(W)m(indo)n(ws)i(is)0
969 y(simpler)f(than)g(under)g(U)t Fo(N)t(I)t(X)r Ft(,)j(the)e
Fs(--pr)o(e\002x)e Ft(option)g(has)h(traditionally)f(been)h(used)g(to)g
(install)h(additional)e(packages)g(in)h(separate)0 1069
y(locations)20 b(on)f(W)m(indo)n(ws.)236 1307 y Fk(python)44
b(setup.py)g(install)f(--prefix="\\Temp\\Python")0 1594
y Ft(to)20 b(install)h(modules)e(to)i(the)f(`)p Fi(n)p
Fr(T)-9 b(emp)p Fi(n)p Fr(Python)p Ft(')18 b(directory)h(on)g(the)i
(current)e(dri)n(v)o(e.)0 1741 y(The)g(installation)g(base)h(is)g
(de\002ned)e(by)h(the)h Fs(--pr)o(e\002x)e Ft(option;)h(the)g
Fs(--exec-pr)o(e\002x)e Ft(option)i(is)h(not)f(supported)e(under)h(W)m
(indo)n(ws.)25 b(Files)0 1840 y(are)20 b(installed)g(as)h(follo)n(ws:)
697 2033 y Fs(T)-6 b(ype)21 b(of)e(\002le)p 1717 2063
4 100 v 681 w(Installation)h(Dir)o(ectory)p 2583 2063
V 97 w(Ov)o(erride)g(option)p 647 2066 2606 4 v 697 2136
a Ft(pure)f(module)g(distrib)n(ution)p 1717 2166 4 100
v 250 w Fh(pre\002x)p 2583 2166 V 683 w Fs(--install-pur)o(elib)697
2236 y Ft(non-pure)f(module)g(distrib)n(ution)p 1717
2265 V 98 w Fh(pre\002x)p 2583 2265 V 683 w Fs(--install-platlib)697
2335 y Ft(scripts)p 1717 2365 V 854 w Fh(pre\002x)7 b
Fi(n)p Fr(Scr)q(ipts)p 2583 2365 V 408 w Fs(--install-scripts)697
2435 y Ft(data)p 1717 2465 V 932 w Fh(pre\002x)g Fi(n)p
Fr(Data)p 2583 2465 V 479 w Fs(--install-data)0 2739
y Fu(4)120 b(Custom)34 b(Installation)0 2972 y Ft(Sometimes,)28
b(the)e(alternate)g(installation)g(schemes)h(described)e(in)i(section)f
(3)h(just)g(don')o(t)e(do)h(what)h(you)e(w)o(ant.)45
b(Y)-9 b(ou)26 b(might)f(w)o(ant)0 3072 y(to)i(tweak)f(just)i(one)e(or)
g(tw)o(o)h(directories)f(while)g(k)o(eeping)g(e)n(v)o(erything)e(under)
h(the)i(same)g(base)f(directory)-5 b(,)26 b(or)h(you)f(might)g(w)o(ant)
g(to)0 3171 y(completely)19 b(rede\002ne)g(the)h(installation)g
(scheme.)k(In)c(either)g(case,)g(you')l(re)f(creating)g(a)h
Fn(custom)g(installation)g(sc)o(heme)p Ft(.)0 3318 y(Y)-9
b(ou)15 b(probably)e(noticed)h(the)i(column)e(of)h(\223o)o(v)o(erride)e
(options\224)h(in)h(the)h(tables)f(describing)f(the)i(alternate)e
(installation)h(schemes)g(abo)o(v)o(e.)0 3418 y(Those)23
b(options)g(are)g(ho)n(w)g(you)g(de\002ne)g(a)h(custom)f(installation)g
(scheme.)35 b(These)23 b(o)o(v)o(erride)e(options)i(can)g(be)h(relati)n
(v)o(e,)f(absolute,)h(or)0 3517 y(e)o(xplicitly)d(de\002ned)g(in)h
(terms)g(of)g(one)f(of)h(the)g(installation)g(base)g(directories.)29
b(\(There)21 b(are)h(tw)o(o)g(installation)g(base)g(directories,)f(and)
0 3617 y(the)o(y)i(are)h(normally)e(the)i(same\227the)o(y)f(only)g(dif)
n(fer)g(when)h(you)f(use)h(the)i(U)t Fo(N)t(I)t(X)h Ft(\223pre\002x)c
(scheme\224)g(and)g(supply)g(dif)n(ferent)g Fs(--pr)o(e\002x)0
3717 y Ft(and)d Fs(--exec-pr)o(e\002x)d Ft(options.\))0
3863 y(F)o(or)25 b(e)o(xample,)f(say)i(you')l(re)d(installing)i(a)g
(module)f(distrib)n(ution)g(to)h(your)f(home)g(directory)g(under)h(U)t
Fo(N)t(I)t(X)r Ft(\227b)n(ut)h(you)e(w)o(ant)h(scripts)0
3963 y(to)f(go)f(in)h(`)p Fr(\230/scr)q(ipts)p Ft(')f(rather)g(than)g
(`)p Fr(\230/bin)p Ft('.)33 b(As)24 b(you)f(might)g(e)o(xpect,)g(you)g
(can)g(o)o(v)o(erride)f(this)i(directory)e(with)h(the)h
Fs(--install-scripts)0 4063 y Ft(option;)c(in)i(this)f(case,)h(it)g
(mak)o(es)f(most)g(sense)g(to)h(supply)e(a)h(relati)n(v)o(e)g(path,)f
(which)h(will)h(be)f(interpreted)e(relati)n(v)o(e)i(to)g(the)g
(installation)0 4162 y(base)f(directory)f(\(your)f(home)i(directory)-5
b(,)17 b(in)k(this)f(case\):)236 4401 y Fk(python)44
b(setup.py)g(install)f(--home=\230)h(--install-scripts=scripts)0
4687 y Ft(Another)18 b(U)t Fo(N)t(I)t(X)i Ft(e)o(xample:)i(suppose)16
b(your)f(Python)h(installation)h(w)o(as)h(b)n(uilt)f(and)f(installed)h
(with)g(a)g(pre\002x)g(of)f(`)p Fr(/usr/local/p)n(ython)p
Ft(',)d(so)0 4787 y(under)18 b(a)i(standard)e(installation)h(scripts)h
(will)g(wind)f(up)g(in)g(`)p Fr(/usr/local/p)n(ython/bin)p
Ft('.)g(If)g(you)f(w)o(ant)i(them)f(in)g(`)p Fr(/usr/local/bin)p
Ft(')d(instead,)0 4886 y(you)j(w)o(ould)h(supply)f(this)i(absolute)e
(directory)g(for)g(the)h Fs(--install-scripts)g Ft(option:)236
5124 y Fk(python)44 b(setup.py)g(install)f
(--install-scripts=/usr/local/bin)p 0 5549 3901 4 v 0
5649 a Fj(3.3)83 b(Alter)r(nate)25 b(installation:)31
b(Windo)o(ws)23 b(\(the)g(pre\002x)f(scheme\))1785 b(7)p
eop end
%%Page: 8 8
TeXDict begin 8 7 bop 0 83 a Ft(\(This)27 b(performs)f(an)h
(installation)g(using)g(the)g(\223pre\002x)g(scheme,)-6
b(\224)29 b(where)d(the)i(pre\002x)e(is)j(whate)n(v)o(er)d(your)g
(Python)g(interpreter)g(w)o(as)0 183 y(installed)20 b(with\227)h(`)p
Fr(/usr/local/p)n(ython)p Ft(')15 b(in)21 b(this)f(case.\))0
330 y(If)26 b(you)g(maintain)f(Python)g(on)h(W)m(indo)n(ws,)h(you)f
(might)f(w)o(ant)i(third-party)d(modules)h(to)h(li)n(v)o(e)g(in)h(a)g
(subdirectory)c(of)k Fh(pre\002x)7 b Ft(,)27 b(rather)0
429 y(than)h(right)g(in)g Fh(pre\002x)36 b Ft(itself.)50
b(This)29 b(is)g(almost)f(as)h(easy)g(as)g(customizing)e(the)h(script)h
(installation)f(directory\227you)d(just)k(ha)n(v)o(e)e(to)0
529 y(remember)16 b(that)i(there)f(are)h(tw)o(o)g(types)g(of)f(modules)
g(to)h(w)o(orry)f(about,)g(pure)g(modules)g(and)g(non-pure)e(modules)i
(\(i.e.,)h(modules)f(from)0 628 y(a)k(non-pure)c(distrib)n(ution\).)23
b(F)o(or)d(e)o(xample:)236 867 y Fk(python)44 b(setup.py)g(install)f
(--install-purelib=Site)e(--install-platlib=Site)0 1153
y Ft(The)19 b(speci\002ed)h(installation)f(directories)f(are)i(relati)n
(v)o(e)f(to)h Fh(pre\002x)7 b Ft(.)25 b(Of)19 b(course,)g(you)g(also)h
(ha)n(v)o(e)f(to)h(ensure)e(that)i(these)g(directories)f(are)0
1253 y(in)25 b(Python')-5 b(s)24 b(module)g(search)h(path,)g(such)g(as)
h(by)e(putting)g(a)h(`)p Fr(.pth)p Ft(')f(\002le)i(in)f
Fh(pre\002x)7 b Ft(.)39 b(See)26 b(section)f(4.1)f(to)h(\002nd)g(out)g
(ho)n(w)f(to)h(modify)0 1352 y(Python')-5 b(s)19 b(search)h(path.)0
1499 y(If)26 b(you)g(w)o(ant)g(to)h(de\002ne)f(an)g(entire)g
(installation)g(scheme,)h(you)f(just)h(ha)n(v)o(e)f(to)g(supply)g(all)h
(of)f(the)g(installation)g(directory)f(options.)0 1599
y(The)20 b(recommended)e(w)o(ay)j(to)g(do)f(this)h(is)h(to)f(supply)f
(relati)n(v)o(e)g(paths;)h(for)f(e)o(xample,)f(if)i(you)f(w)o(ant)h(to)
f(maintain)g(all)i(Python)d(module-)0 1698 y(related)j(\002les)i(under)
d(`)p Fr(p)n(ython)p Ft(')g(in)i(your)f(home)g(directory)-5
b(,)21 b(and)h(you)g(w)o(ant)h(a)g(separate)f(directory)g(for)g(each)g
(platform)g(that)g(you)g(use)0 1798 y(your)d(home)g(directory)g(from,)g
(you)g(might)g(de\002ne)h(the)g(follo)n(wing)f(installation)h(scheme:)
236 2036 y Fk(python)44 b(setup.py)g(install)f(--home=\230)h(\\)1312
2128 y(--install-purelib=python/lib)c(\\)1312 2219 y
(--install-platlib=python/lib.$PLAT)f(\\)1312 2310 y
(--install-scripts=python/scripts)1312 2402 y
(--install-data=python/data)0 2688 y Ft(or)m(,)19 b(equi)n(v)n(alently)
-5 b(,)236 2926 y Fk(python)44 b(setup.py)g(install)f
(--home=\230/python)f(\\)1312 3018 y(--install-purelib=lib)f(\\)1312
3109 y(--install-platlib='lib.$PLAT')f(\\)1312 3200 y
(--install-scripts=scripts)1312 3292 y(--install-data=data)0
3578 y Fl($PLAT)22 b Ft(is)h(not)e(\(necessarily\))g(an)h(en)m
(vironment)d(v)n(ariable\227it)i(will)h(be)g(e)o(xpanded)e(by)h(the)h
(Distutils)h(as)g(it)g(parses)f(your)f(command)0 3678
y(line)f(options,)f(just)i(as)g(it)g(does)f(when)f(parsing)h(your)e
(con\002guration)g(\002le\(s\).)0 3825 y(Ob)o(viously)-5
b(,)23 b(specifying)f(the)i(entire)g(installation)f(scheme)h(e)n(v)o
(ery)f(time)h(you)f(install)i(a)f(ne)n(w)g(module)f(distrib)n(ution)f
(w)o(ould)i(be)g(v)o(ery)0 3924 y(tedious.)g(Thus,)c(you)f(can)h(put)g
(these)g(options)g(into)g(your)f(Distutils)i(con\002g)e(\002le)i(\(see)
f(section)g(5\):)236 4162 y Fk([install])236 4254 y(install-base=$HOME)
236 4345 y(install-purelib=python/lib)236 4436 y
(install-platlib=python/lib.$PLAT)236 4528 y
(install-scripts=python/scripts)236 4619 y(install-data=python/data)0
4906 y Ft(or)m(,)f(equi)n(v)n(alently)-5 b(,)p 0 5549
3901 4 v 0 5649 a Fj(8)3019 b(4)83 b(Custom)23 b(Installation)p
eop end
%%Page: 9 9
TeXDict begin 9 8 bop 236 174 a Fk([install])236 266
y(install-base=$HOME/python)236 357 y(install-purelib=lib)236
448 y(install-platlib=lib.$PLAT)236 540 y(install-scripts=scripts)236
631 y(install-data=data)0 917 y Ft(Note)28 b(that)g(these)h(tw)o(o)f
(are)g Fn(not)g Ft(equi)n(v)n(alent)e(if)j(you)e(supply)g(a)i(dif)n
(ferent)d(installation)i(base)g(directory)e(when)i(you)f(run)h(the)g
(setup)0 1017 y(script.)d(F)o(or)20 b(e)o(xample,)236
1255 y Fk(python)44 b(setup.py)g(install)f(--install-base=/tmp)0
1542 y Ft(w)o(ould)20 b(install)h(pure)e(modules)h(to)h
Fh(/tmp/p)n(ython/lib)d Ft(in)j(the)g(\002rst)g(case,)g(and)f(to)g
Fh(/tmp/lib)h Ft(in)g(the)f(second)g(case.)26 b(\(F)o(or)20
b(the)h(second)e(case,)0 1641 y(you)g(probably)f(w)o(ant)j(to)f(supply)
f(an)h(installation)g(base)g(of)g(`)p Fr(/tmp/p)n(ython)p
Ft('.\))0 1788 y(Y)-9 b(ou)17 b(probably)e(noticed)h(the)h(use)h(of)f
Fl($HOME)g Ft(and)f Fl($PLAT)h Ft(in)h(the)f(sample)g(con\002guration)e
(\002le)j(input.)23 b(These)17 b(are)g(Distutils)h(con\002gu-)0
1888 y(ration)f(v)n(ariables,)h(which)f(bear)h(a)g(strong)g
(resemblance)e(to)i(en)m(vironment)d(v)n(ariables.)24
b(In)18 b(f)o(act,)g(you)f(can)h(use)g(en)m(vironment)d(v)n(ariables)0
1988 y(in)21 b(con\002g)f(\002les)i(on)f(platforms)f(that)h(ha)n(v)o(e)
g(such)f(a)i(notion)e(b)n(ut)h(the)g(Distutils)h(additionally)d
(de\002ne)i(a)g(fe)n(w)g(e)o(xtra)g(v)n(ariables)f(that)h(may)0
2087 y(not)h(be)g(in)g(your)f(en)m(vironment,)e(such)j(as)g
Fl($PLAT)p Ft(.)g(\(And)f(of)h(course,)f(on)h(systems)g(that)h(don')o
(t)d(ha)n(v)o(e)h(en)m(vironment)e(v)n(ariables,)j(such)0
2187 y(as)j(Mac)f(OS)h(9,)g(the)f(con\002guration)d(v)n(ariables)i
(supplied)g(by)h(the)g(Distutils)h(are)f(the)g(only)f(ones)h(you)f(can)
h(use.\))37 b(See)24 b(section)g(5)g(for)0 2286 y(details.)0
2571 y Fm(4.1)100 b(Modifying)29 b(Python')-5 b(s)29
b(Search)g(P)l(ath)0 2774 y Ft(When)20 b(the)h(Python)e(interpreter)g
(e)o(x)o(ecutes)h(an)g Fl(import)g Ft(statement,)g(it)h(searches)g(for)
f(both)f(Python)h(code)g(and)g(e)o(xtension)f(modules)0
2874 y(along)f(a)h(search)f(path.)24 b(A)c(def)o(ault)e(v)n(alue)g(for)
g(the)h(path)f(is)i(con\002gured)c(into)j(the)g(Python)e(binary)h(when)
g(the)h(interpreter)e(is)j(b)n(uilt.)k(Y)-9 b(ou)0 2973
y(can)20 b(determine)f(the)h(path)g(by)f(importing)g(the)h
Fl(sys)g Ft(module)f(and)h(printing)e(the)i(v)n(alue)g(of)g
Fl(sys.path)p Ft(.)236 3120 y Fk($)45 b(python)236 3212
y(Python)f(2.2)g(\(#11,)g(Oct)90 b(3)44 b(2002,)g(13:31:27\))236
3303 y([GCC)g(2.96)h(20000731)e(\(Red)h(Hat)h(Linux)f(7.3)g
(2.96-112\)])f(on)h(linux2)236 3394 y(Type)g(``help'',)g
(``copyright'',)e(``credits'')h(or)i(``license'')e(for)h(more)g
(information.)236 3486 y(>>>)h(import)e(sys)236 3577
y(>>>)i(sys.path)236 3668 y(['',)f('/usr/local/lib/python2.3',)d
('/usr/local/lib/python2.3/plat-linux2)o(',)281 3760
y('/usr/local/lib/python2.3/lib-tk',)e
('/usr/local/lib/python2.3/lib-dynload',)281 3851 y
('/usr/local/lib/python2.3/site-packages)o('])236 3942
y(>>>)0 4229 y Ft(The)20 b(null)g(string)g(in)g Fl(sys.path)f
Ft(represents)h(the)g(current)f(w)o(orking)f(directory)-5
b(.)0 4376 y(The)19 b(e)o(xpected)f(con)m(v)o(ention)e(for)j(locally)g
(installed)h(packages)e(is)i(to)g(put)f(them)g(in)h(the)f(`)p
Fr(.../site-pac)o(kages/)p Ft(')d(directory)-5 b(,)17
b(b)n(ut)i(you)g(may)0 4475 y(w)o(ant)f(to)g(install)g(Python)f
(modules)g(into)g(some)h(arbitrary)e(directory)-5 b(.)22
b(F)o(or)c(e)o(xample,)e(your)h(site)i(may)e(ha)n(v)o(e)g(a)i(con)m(v)o
(ention)14 b(of)k(k)o(eeping)0 4575 y(all)27 b(softw)o(are)f(related)h
(to)f(the)h(web)g(serv)o(er)e(under)h(`)p Fr(/www)p Ft('.)43
b(Add-on)25 b(Python)h(modules)f(might)h(then)g(belong)g(in)h(`)p
Fr(/www/p)n(ython)p Ft(',)0 4675 y(and)21 b(in)i(order)d(to)i(import)f
(them,)h(this)h(directory)d(must)i(be)g(added)f(to)h
Fl(sys.path)p Ft(.)29 b(There)21 b(are)h(se)n(v)o(eral)f(dif)n(ferent)g
(w)o(ays)h(to)g(add)g(the)0 4774 y(directory)-5 b(.)0
4921 y(The)17 b(most)g(con)m(v)o(enient)e(w)o(ay)i(is)h(to)g(add)e(a)i
(path)f(con\002guration)e(\002le)i(to)h(a)g(directory)d(that')-5
b(s)18 b(already)e(on)h(Python')-5 b(s)16 b(path,)h(usually)g(to)h(the)
0 5021 y(`)p Fr(.../site-pac)o(kages/)p Ft(')h(directory)-5
b(.)30 b(P)o(ath)23 b(con\002guration)d(\002les)j(ha)n(v)o(e)f(an)h(e)o
(xtension)e(of)i(`)p Fr(.pth)p Ft(',)e(and)h(each)g(line)h(must)g
(contain)f(a)h(single)0 5120 y(path)18 b(that)h(will)h(be)f(appended)e
(to)i Fl(sys.path)p Ft(.)k(\(Because)c(the)g(ne)n(w)g(paths)f(are)h
(appended)e(to)i Fl(sys.path)p Ft(,)f(modules)g(in)h(the)g(added)0
5220 y(directories)h(will)i(not)f(o)o(v)o(erride)d(standard)i(modules.)
27 b(This)21 b(means)g(you)f(can')o(t)g(use)h(this)h(mechanism)e(for)g
(installing)h(\002x)o(ed)g(v)o(ersions)0 5320 y(of)f(standard)f
(modules.\))p 0 5549 3901 4 v 0 5649 a Fj(4.1)83 b(Modifying)25
b(Python')l(s)e(Search)g(P)m(ath)2487 b(9)p eop end
%%Page: 10 10
TeXDict begin 10 9 bop 0 83 a Ft(P)o(aths)16 b(can)f(be)g(absolute)g
(or)g(relati)n(v)o(e,)g(in)h(which)f(case)h(the)o(y')l(re)e(relati)n(v)
o(e)g(to)i(the)f(directory)f(containing)f(the)j(`)p Fr(.pth)p
Ft(')e(\002le.)24 b(An)o(y)15 b(directories)0 183 y(added)k(to)h(the)h
(search)e(path)h(will)h(be)f(scanned)f(in)i(turn)e(for)h(`)p
Fr(.pth)p Ft(')e(\002les.)26 b(See)21 b Fn(site)g(module)e
(documentation)e Ft(for)j(more)f(information.)0 330 y(A)f(slightly)f
(less)h(con)m(v)o(enient)d(w)o(ay)i(is)h(to)g(edit)f(the)h(`)p
Fr(site)o(.p)n(y)p Ft(')d(\002le)j(in)g(Python')-5 b(s)16
b(standard)g(library)-5 b(,)17 b(and)f(modify)g Fl(sys.path)p
Ft(.)23 b(`)p Fr(site)o(.p)n(y)p Ft(')0 429 y(is)k(automatically)e
(imported)f(when)i(the)g(Python)f(interpreter)f(is)j(e)o(x)o(ecuted,)f
(unless)g(the)g Fs(-S)h Ft(switch)f(is)h(supplied)e(to)h(suppress)g
(this)0 529 y(beha)n(viour)-5 b(.)23 b(So)e(you)e(could)g(simply)h
(edit)g(`)p Fr(site)o(.p)n(y)p Ft(')f(and)h(add)f(tw)o(o)i(lines)f(to)h
(it:)236 676 y Fk(import)44 b(sys)236 767 y
(sys.path.append\('/www/python/'\))0 1053 y Ft(Ho)n(we)n(v)o(er)m(,)20
b(if)i(you)f(reinstall)h(the)g(same)g(major)f(v)o(ersion)g(of)g(Python)
g(\(perhaps)f(when)h(upgrading)e(from)i(2.2)g(to)h(2.2.2,)f(for)g(e)o
(xample\))0 1153 y(`)p Fr(site)o(.p)n(y)p Ft(')d(will)h(be)g(o)o(v)o
(erwritten)e(by)i(the)g(stock)g(v)o(ersion.)k(Y)-9 b(ou')l(d)18
b(ha)n(v)o(e)g(to)h(remember)f(that)h(it)h(w)o(as)g(modi\002ed)d(and)i
(sa)n(v)o(e)g(a)h(cop)o(y)e(before)0 1253 y(doing)h(the)h
(installation.)0 1400 y(There)c(are)h(tw)o(o)h(en)m(vironment)c(v)n
(ariables)i(that)h(can)g(modify)e Fl(sys.path)p Ft(.)23
b(PYTHONHOME)17 b(sets)h(an)f(alternate)f(v)n(alue)h(for)f(the)h(pre-)0
1499 y(\002x)j(of)g(the)g(Python)f(installation.)25 b(F)o(or)20
b(e)o(xample,)e(if)j(PYTHONHOME)e(is)i(set)g(to)g(`)p
Fl(/www/python)p Ft(',)c(the)j(search)g(path)g(will)h(be)f(set)0
1599 y(to)99 b Fl(['',)49 b('/www/python/lib/python2.5/',)44
b('/www/python/lib/python2.5/plat-linux2)o(',)0 1698
y(...])p Ft(.)0 1845 y(The)18 b(PYTHONP)-8 b(A)f(TH)18
b(v)n(ariable)f(can)h(be)g(set)h(to)g(a)f(list)h(of)f(paths)g(that)h
(will)g(be)f(added)f(to)h(the)g(be)o(ginning)e(of)i Fl(sys.path)p
Ft(.)23 b(F)o(or)18 b(e)o(xam-)0 1945 y(ple,)k(if)g(PYTHONP)-8
b(A)f(TH)22 b(is)h(set)g(to)f(`)p Fl(/www/python:/opt/py)p
Ft(',)c(the)k(search)f(path)h(will)g(be)o(gin)f(with)h
Fl(['/www/python',)0 2045 y('/opt/py'])p Ft(.)h(\(Note)18
b(that)h(directories)e(must)h(e)o(xist)h(in)f(order)g(to)g(be)g(added)g
(to)g Fl(sys.path)p Ft(;)g(the)h Fl(site)f Ft(module)f(remo)o(v)o(es)g
(paths)0 2144 y(that)j(don')o(t)f(e)o(xist.\))0 2291
y(Finally)-5 b(,)32 b Fl(sys.path)d Ft(is)i(just)f(a)g(re)o(gular)f
(Python)g(list,)k(so)d(an)o(y)f(Python)g(application)g(can)g(modify)g
(it)h(by)g(adding)e(or)i(remo)o(ving)0 2391 y(entries.)0
2718 y Fu(5)120 b(Distutils)33 b(Con\002gur)o(ation)j(Files)0
2951 y Ft(As)24 b(mentioned)d(abo)o(v)o(e,)i(you)f(can)h(use)g
(Distutils)i(con\002guration)20 b(\002les)25 b(to)e(record)f(personal)g
(or)h(site)h(preferences)d(for)i(an)o(y)g(Distutils)0
3051 y(options.)53 b(That)29 b(is,)k(an)o(y)c(option)g(to)h(an)o(y)f
(command)e(can)j(be)g(stored)f(in)h(one)f(of)h(tw)o(o)g(or)f(three)h
(\(depending)d(on)i(your)f(platform\))0 3150 y(con\002guration)23
b(\002les,)29 b(which)c(will)i(be)f(consulted)f(before)g(the)h
(command-line)d(is)k(parsed.)42 b(This)26 b(means)g(that)g
(con\002guration)e(\002les)0 3250 y(will)g(o)o(v)o(erride)d(def)o(ault)
h(v)n(alues,)h(and)g(the)g(command-line)e(will)j(in)f(turn)f(o)o(v)o
(erride)f(con\002guration)g(\002les.)35 b(Furthermore,)21
b(if)i(multiple)0 3349 y(con\002guration)18 b(\002les)j(apply)-5
b(,)18 b(v)n(alues)i(from)f(\223earlier\224)h(\002les)h(are)f(o)o(v)o
(erridden)d(by)j(\223later\224)g(\002les.)0 3634 y Fm(5.1)100
b(Location)29 b(and)g(names)g(of)f(con\002g)g(\002les)0
3837 y Ft(The)21 b(names)h(and)f(locations)g(of)g(the)g
(con\002guration)e(\002les)k(v)n(ary)e(slightly)g(across)g(platforms.)
28 b(On)c(U)t Fo(N)t(I)t(X)h Ft(and)c(Mac)g(OS)i(X,)e(the)h(three)0
3937 y(con\002guration)c(\002les)j(\(in)f(the)g(order)f(the)o(y)g(are)h
(processed\))f(are:)907 4147 y Fs(T)-6 b(ype)21 b(of)f(\002le)p
1346 4176 4 100 v 99 w(Location)g(and)g(\002lename)p
2743 4176 V 609 w(Notes)p 857 4180 2186 4 v 907 4250
a Ft(system)p 1346 4279 4 100 v 259 w Fh(pre\002x)7 b
Fr(/lib/p)n(ython)p Fh(v)n(er)h Fr(/distutils/distu)o(til)o(s)o(.cfg)p
2743 4279 V 144 w Ft(\(1\))907 4349 y(personal)p 1346
4379 V 207 w Fr($HOME/.p)n(ydistutils)o(.cfg)p 2743 4379
V 692 w Ft(\(2\))907 4449 y(local)p 1346 4479 V 328 w
Fr(setup)m(.cfg)p 2743 4479 V 1146 w Ft(\(3\))0 4657
y(And)20 b(on)f(W)m(indo)n(ws,)h(the)g(con\002guration)e(\002les)j
(are:)1045 4867 y Fs(T)-6 b(ype)20 b(of)g(\002le)p 1484
4897 V 100 w(Location)f(and)i(\002lename)p 2605 4897
V 333 w(Notes)p 995 4900 1910 4 v 1045 4970 a Ft(system)p
1484 5000 4 100 v 259 w Fh(pre\002x)7 b Fi(n)p Fr(Lib)p
Fi(n)p Fr(distutils)p Fi(n)p Fr(distutils)o(.cfg)p 2605
5000 V 146 w Ft(\(4\))1045 5070 y(personal)p 1484 5099
V 207 w Fr(\045HOME\045)p Fi(n)p Fr(p)n(ydistutils)o(.cfg)p
2605 5099 V 331 w Ft(\(5\))1045 5169 y(local)p 1484 5199
V 328 w Fr(setup)m(.cfg)p 2605 5199 V 871 w Ft(\(3\))0
5376 y(Notes:)p 0 5549 3901 4 v 0 5649 a Fj(10)2674 b(5)83
b(Distutils)24 b(Con\002gur)o(ation)g(Files)p eop end
%%Page: 11 11
TeXDict begin 11 10 bop 0 83 a Fs(\(1\))40 b Ft(Strictly)22
b(speaking,)e(the)i(system-wide)e(con\002guration)f(\002le)j(li)n(v)o
(es)g(in)f(the)h(directory)e(where)g(the)i(Distutils)g(are)g
(installed;)g(under)208 183 y(Python)j(1.6)h(and)g(later)g(on)i(U)t
Fo(N)t(I)t(X)r Ft(,)h(this)e(is)h(as)f(sho)n(wn.)43 b(F)o(or)26
b(Python)g(1.5.2,)g(the)h(Distutils)g(will)h(normally)d(be)h(installed)
g(to)208 282 y(`)p Fh(pre\002x)7 b Fr(/lib/p)n(ython1.5/site)o(-pa)o(c)
o(kag)o(es/di)o(stuti)o(ls)p Ft(',)20 b(so)26 b(the)f(system)g
(con\002guration)e(\002le)j(should)e(be)h(put)f(there)h(under)f(Python)
208 382 y(1.5.2.)0 548 y Fs(\(2\))40 b Ft(On)27 b(U)t
Fo(N)t(I)t(X)r Ft(,)g(if)e(the)f(HOME)h(en)m(vironment)d(v)n(ariable)h
(is)j(not)e(de\002ned,)h(the)g(user')-5 b(s)25 b(home)e(directory)g
(will)j(be)f(determined)d(with)208 648 y(the)e Fl(getpwuid\(\))f
Ft(function)f(from)h(the)h(standard)g Fl(pwd)g Ft(module.)0
814 y Fs(\(3\))40 b Ft(I.e.,)20 b(in)g(the)g(current)f(directory)g
(\(usually)g(the)h(location)f(of)h(the)h(setup)f(script\).)0
980 y Fs(\(4\))40 b Ft(\(See)18 b(also)g(note)g(\(1\).\))23
b(Under)17 b(Python)g(1.6)g(and)g(later)m(,)h(Python')-5
b(s)17 b(def)o(ault)g(\223installation)h(pre\002x\224)f(is)i(`)p
Fr(C:)p Fi(n)p Fr(Python)p Ft(',)d(so)i(the)g(system)208
1079 y(con\002guration)g(\002le)23 b(is)f(normally)e(`)p
Fr(C:)p Fi(n)p Fr(Python)p Fi(n)p Fr(Lib)p Fi(n)p Fr(distutils)p
Fi(n)p Fr(distutils)o(.cfg)p Ft('.)j(Under)e(Python)f(1.5.2,)g(the)i
(def)o(ault)f(pre\002x)g(w)o(as)208 1179 y(`)p Fr(C:)p
Fi(n)p Fr(Prog)o(r)o(am)26 b(Files)p Fi(n)p Fr(Python)p
Ft(',)g(and)h(the)g(Distutils)g(were)g(not)g(part)g(of)f(the)h
(standard)f(library\227so)g(the)h(system)g(con\002gura-)208
1279 y(tion)20 b(\002le)h(w)o(ould)f(be)g(`)p Fr(C:)p
Fi(n)p Fr(Prog)o(r)o(am)g(Files)p Fi(n)p Fr(Python)p
Fi(n)p Fr(distutils)p Fi(n)p Fr(distutils)o(.cfg)p Ft(')15
b(in)21 b(a)g(standard)e(Python)h(1.5.2)f(installation)h(under)208
1378 y(W)m(indo)n(ws.)0 1544 y Fs(\(5\))40 b Ft(On)25
b(W)m(indo)n(ws,)h(if)f(the)g(HOME)g(en)m(vironment)d(v)n(ariable)i(is)
i(not)f(de\002ned,)g(no)g(personal)f(con\002guration)e(\002le)k(will)g
(be)f(found)e(or)208 1644 y(used.)h(\(In)c(other)f(w)o(ords,)h(the)g
(Distutils)h(mak)o(e)f(no)g(attempt)f(to)i(guess)f(your)f(home)g
(directory)g(on)g(W)m(indo)n(ws.\))0 1929 y Fm(5.2)100
b(Syntax)28 b(of)g(con\002g)h(\002les)0 2132 y Ft(The)d(Distutils)i
(con\002guration)c(\002les)k(all)f(ha)n(v)o(e)f(the)h(same)g(syntax.)44
b(The)26 b(con\002g)g(\002les)i(are)e(grouped)f(into)h(sections.)45
b(There)25 b(is)j(one)0 2231 y(section)i(for)g(each)g(Distutils)h
(command,)g(plus)f(a)h Fl(global)e Ft(section)h(for)g(global)f(options)
h(that)g(af)n(fect)g(e)n(v)o(ery)f(command.)53 b(Each)0
2331 y(section)20 b(consists)h(of)f(one)f(option)g(per)h(line,)g
(speci\002ed)g(as)h Fl(option=value)p Ft(.)0 2478 y(F)o(or)f(e)o
(xample,)e(the)j(follo)n(wing)d(is)j(a)g(complete)e(con\002g)g(\002le)i
(that)f(just)h(forces)f(all)h(commands)d(to)i(run)g(quietly)f(by)h(def)
o(ault:)236 2625 y Fk([global])236 2716 y(verbose=0)0
3002 y Ft(If)h(this)h(is)g(installed)f(as)h(the)g(system)f(con\002g)f
(\002le,)i(it)g(will)g(af)n(fect)f(all)h(processing)e(of)h(an)o(y)f
(Python)g(module)g(distrib)n(ution)g(by)h(an)o(y)g(user)0
3102 y(on)h(the)h(current)f(system.)33 b(If)23 b(it)g(is)h(installed)f
(as)h(your)d(personal)h(con\002g)g(\002le)h(\(on)g(systems)g(that)g
(support)e(them\),)i(it)g(will)h(af)n(fect)e(only)0 3202
y(module)16 b(distrib)n(utions)g(processed)f(by)i(you.)23
b(And)16 b(if)h(it)h(is)g(used)e(as)i(the)f(`)p Fr(setup)m(.cfg)p
Ft(')e(for)i(a)g(particular)f(module)f(distrib)n(ution,)h(it)i(af)n
(fects)0 3301 y(only)h(that)i(distrib)n(ution.)0 3448
y(Y)-9 b(ou)25 b(could)g(o)o(v)o(erride)e(the)j(def)o(ault)f(\223b)n
(uild)g(base\224)g(directory)f(and)h(mak)o(e)g(the)h
Fl(build)2552 3463 y(*)2627 3448 y Ft(commands)e(al)o(w)o(ays)i
(forcibly)e(reb)n(uild)h(all)0 3548 y(\002les)c(with)g(the)f(follo)n
(wing:)236 3786 y Fk([build])236 3877 y(build-base=blib)236
3969 y(force=1)0 4255 y Ft(which)g(corresponds)e(to)i(the)g
(command-line)d(ar)o(guments)236 4493 y Fk(python)44
b(setup.py)g(build)g(--build-base=blib)d(--force)0 4780
y Ft(e)o(xcept)31 b(that)h(including)e(the)i Fl(build)f
Ft(command)f(on)h(the)h(command-line)d(means)j(that)f(command)f(will)j
(be)f(run.)59 b(Including)29 b(a)0 4880 y(particular)17
b(command)e(in)j(con\002g)f(\002les)i(has)f(no)g(such)f(implication;)h
(it)g(only)f(means)h(that)g(if)g(the)g(command)e(is)i(run,)g(the)g
(options)f(in)h(the)0 4979 y(con\002g)k(\002le)h(will)g(apply)-5
b(.)30 b(\(Or)22 b(if)h(other)e(commands)g(that)i(deri)n(v)o(e)e(v)n
(alues)h(from)f(it)i(are)g(run,)f(the)o(y)f(will)i(use)g(the)f(v)n
(alues)g(in)h(the)f(con\002g)0 5079 y(\002le.\))0 5226
y(Y)-9 b(ou)20 b(can)g(\002nd)g(out)f(the)i(complete)e(list)i(of)f
(options)f(for)h(an)o(y)f(command)f(using)i(the)g Fs(--help)g
Ft(option,)f(e.g.:)p 0 5549 3901 4 v 0 5649 a Fj(5.2)83
b(Syntax)23 b(of)h(con\002g)e(\002les)2848 b(11)p eop
end
%%Page: 12 12
TeXDict begin 12 11 bop 236 174 a Fk(python)44 b(setup.py)g(build)g
(--help)0 461 y Ft(and)20 b(you)f(can)h(\002nd)g(out)g(the)g(complete)f
(list)i(of)f(global)g(options)f(by)h(using)f Fs(--help)i
Ft(without)e(a)i(command:)236 699 y Fk(python)44 b(setup.py)g(--help)0
986 y Ft(See)21 b(also)f(the)g(\223Reference\224)f(section)h(of)g(the)g
(\223Distrib)n(uting)g(Python)f(Modules\224)g(manual.)0
1310 y Fu(6)120 b(Building)33 b(Extensions:)43 b(Tips)33
b(and)h(T)-14 b(r)r(ic)n(ks)0 1543 y Ft(Whene)n(v)o(er)16
b(possible,)h(the)h(Distutils)g(try)g(to)f(use)h(the)f(con\002guration)
e(information)g(made)i(a)n(v)n(ailable)g(by)g(the)h(Python)e
(interpreter)g(used)0 1643 y(to)k(run)g(the)g(`)p Fr(setup)m(.p)n(y)p
Ft(')f(script.)25 b(F)o(or)20 b(e)o(xample,)e(the)i(same)h(compiler)e
(and)g(link)o(er)h(\003ags)h(used)f(to)g(compile)f(Python)g(will)i
(also)g(be)f(used)0 1742 y(for)g(compiling)g(e)o(xtensions.)26
b(Usually)21 b(this)h(will)f(w)o(ork)g(well,)g(b)n(ut)g(in)g
(complicated)f(situations)h(this)g(might)g(be)g(inappropriate.)j(This)0
1842 y(section)c(discusses)h(ho)n(w)e(to)i(o)o(v)o(erride)d(the)i
(usual)g(Distutils)h(beha)n(viour)-5 b(.)0 2124 y Fm(6.1)100
b(T)-12 b(w)o(eaking)29 b(compiler/link)n(er)h(\003ags)0
2327 y Ft(Compiling)23 b(a)i(Python)f(e)o(xtension)f(written)h(in)h(C)g
(or)g(C)1625 2320 y(++)1744 2327 y(will)g(sometimes)f(require)g
(specifying)e(custom)i(\003ags)h(for)f(the)h(compiler)0
2427 y(and)g(link)o(er)f(in)h(order)f(to)h(use)h(a)f(particular)f
(library)g(or)h(produce)e(a)i(special)g(kind)f(of)h(object)g(code.)39
b(This)25 b(is)h(especially)e(true)h(if)h(the)0 2526
y(e)o(xtension)19 b(hasn')o(t)g(been)g(tested)i(on)f(your)f(platform,)f
(or)i(if)g(you')l(re)f(trying)g(to)h(cross-compile)f(Python.)0
2673 y(In)c(the)h(most)g(general)e(case,)j(the)f(e)o(xtension)e(author)
g(might)h(ha)n(v)o(e)g(foreseen)g(that)h(compiling)e(the)h(e)o
(xtensions)g(w)o(ould)g(be)g(complicated,)0 2773 y(and)26
b(pro)o(vided)f(a)i(`)p Fr(Setup)p Ft(')e(\002le)i(for)g(you)f(to)h
(edit.)45 b(This)27 b(will)g(lik)o(ely)g(only)f(be)h(done)f(if)h(the)g
(module)e(distrib)n(ution)h(contains)g(man)o(y)0 2872
y(separate)20 b(e)o(xtension)e(modules,)h(or)h(if)h(the)o(y)e(often)h
(require)e(elaborate)h(sets)j(of)e(compiler)f(\003ags)h(in)g(order)f
(to)i(w)o(ork.)0 3019 y(A)f(`)p Fr(Setup)p Ft(')d(\002le,)i(if)h
(present,)e(is)i(parsed)e(in)h(order)f(to)h(get)g(a)h(list)g(of)e(e)o
(xtensions)g(to)h(b)n(uild.)24 b(Each)19 b(line)g(in)g(a)h(`)p
Fr(Setup)p Ft(')d(describes)h(a)i(single)0 3119 y(module.)k(Lines)c(ha)
n(v)o(e)f(the)i(follo)n(wing)d(structure:)236 3266 y
Fn(module)48 b Fl(...)i([)p Fn(sour)m(ce\002le)e Fl(...])h([)p
Fn(cppar)m(g)f Fl(...])h([)p Fn(libr)o(ary)g Fl(...])0
3560 y Ft(Let')-5 b(s)21 b(e)o(xamine)e(each)g(of)h(the)h(\002elds)f
(in)h(turn.)125 3775 y Fd(\017)41 b Fn(module)21 b Ft(is)i(the)g(name)f
(of)g(the)g(e)o(xtension)f(module)g(to)i(be)f(b)n(uilt,)h(and)f(should)
g(be)g(a)h(v)n(alid)f(Python)f(identi\002er)-5 b(.)32
b(Y)-9 b(ou)22 b(can')o(t)f(just)208 3874 y(change)f(this)j(in)f(order)
e(to)i(rename)f(a)h(module)f(\(edits)h(to)g(the)g(source)f(code)g(w)o
(ould)g(also)i(be)e(needed\),)g(so)h(this)h(should)d(be)i(left)208
3974 y(alone.)125 4134 y Fd(\017)41 b Fn(sour)m(ce\002le)23
b Ft(is)i(an)o(ything)d(that')-5 b(s)24 b(lik)o(ely)g(to)g(be)g(a)g
(source)g(code)f(\002le,)i(at)g(least)g(judging)d(by)h(the)h
(\002lename.)36 b(Filenames)24 b(ending)208 4233 y(in)h(`)p
Fr(.c)p Ft(')f(are)h(assumed)g(to)g(be)f(written)h(in)g(C,)h
(\002lenames)e(ending)g(in)h(`)p Fr(.C)p Ft(',)f(`)p
Fr(.cc)p Ft(',)i(and)f(`)p Fr(.c++)p Ft(')f(are)h(assumed)f(to)h(be)g
(C)3639 4226 y(++)3733 4233 y(,)h(and)208 4333 y(\002lenames)20
b(ending)e(in)j(`)p Fr(.m)p Ft(')f(or)g(`)p Fr(.mm)p
Ft(')g(are)g(assumed)g(to)g(be)g(in)h(Objecti)n(v)o(e)e(C.)125
4493 y Fd(\017)41 b Fn(cppar)m(g)18 b Ft(is)k(an)e(ar)o(gument)e(for)h
(the)h(C)h(preprocessor)m(,)d(and)h(is)j(an)o(ything)c(starting)h(with)
i Fs(-I)p Ft(,)f Fs(-D)p Ft(,)g Fs(-U)h Ft(or)f Fs(-C)p
Ft(.)125 4653 y Fd(\017)41 b Fn(libr)o(ary)20 b Ft(is)h(an)o(ything)d
(ending)h(in)h(`)p Fr(.a)p Ft(')f(or)h(be)o(ginning)e(with)i
Fs(-l)h Ft(or)f Fs(-L)p Ft(.)0 4867 y(If)30 b(a)g(particular)e
(platform)g(requires)h(a)h(special)g(library)f(on)g(your)g(platform,)h
(you)f(can)g(add)g(it)i(by)e(editing)g(the)h(`)p Fr(Setup)p
Ft(')e(\002le)i(and)0 4967 y(running)18 b Fl(python)49
b(setup.py)f(build)p Ft(.)25 b(F)o(or)19 b(e)o(xample,)g(if)h(the)h
(module)d(de\002ned)i(by)f(the)i(line)236 5113 y Fk(foo)45
b(foomodule.c)0 5400 y Ft(must)20 b(be)g(link)o(ed)g(with)g(the)g(math)
g(library)f(`)p Fr(libm.a)p Ft(')g(on)g(your)g(platform,)g(simply)h
(add)f Fs(-lm)i Ft(to)f(the)g(line:)p 0 5549 3901 4 v
0 5649 a Fj(12)2350 b(6)83 b(Building)26 b(Extensions:)j(Tips)22
b(and)i(T)-10 b(r)q(ic)n(ks)p eop end
%%Page: 13 13
TeXDict begin 13 12 bop 236 83 a Fk(foo)45 b(foomodule.c)e(-lm)0
370 y Ft(Arbitrary)20 b(switches)i(intended)d(for)i(the)g(compiler)f
(or)h(the)h(link)o(er)f(can)g(be)g(supplied)f(with)i(the)f
Fs(-Xcompiler)g Fn(ar)m(g)g Ft(and)g Fs(-Xlink)o(er)h
Fn(ar)m(g)0 470 y Ft(options:)236 708 y Fk(foo)45 b(foomodule.c)e
(-Xcompiler)g(-o32)h(-Xlinker)f(-shared)h(-lm)0 995 y
Ft(The)17 b(ne)o(xt)g(option)g(after)g Fs(-Xcompiler)h
Ft(and)f Fs(-Xlink)o(er)h Ft(will)h(be)e(appended)f(to)i(the)f(proper)f
(command)g(line,)i(so)g(in)g(the)g(abo)o(v)o(e)e(e)o(xample)0
1095 y(the)24 b(compiler)f(will)j(be)e(passed)g(the)g
Fs(-o32)g Ft(option,)f(and)h(the)h(link)o(er)e(will)j(be)e(passed)g
Fs(-shar)o(ed)p Ft(.)37 b(If)24 b(a)h(compiler)e(option)g(requires)h
(an)0 1194 y(ar)o(gument,)g(you')o(ll)g(ha)n(v)o(e)g(to)i(supply)e
(multiple)g Fs(-Xcompiler)h Ft(options;)i(for)d(e)o(xample,)h(to)g
(pass)h Fl(-x)49 b(c++)25 b Ft(the)g(`)p Fr(Setup)p Ft(')f(\002le)h(w)o
(ould)0 1294 y(ha)n(v)o(e)20 b(to)g(contain)f Fl(-Xcompiler)48
b(-x)h(-Xcompiler)f(c++)p Ft(.)0 1441 y(Compiler)15 b(\003ags)i(can)f
(also)g(be)g(supplied)f(through)f(setting)i(the)g(CFLA)m(GS)h(en)m
(vironment)c(v)n(ariable.)22 b(If)16 b(set,)i(the)e(contents)f(of)h
(CFLA)m(GS)0 1540 y(will)21 b(be)f(added)f(to)h(the)h(compiler)e
(\003ags)h(speci\002ed)g(in)g(the)h(`)p Fr(Setup)p Ft(')d(\002le.)0
1825 y Fm(6.2)100 b(Using)28 b(non-Microsoft)i(compilers)e(on)h(Windo)o
(ws)0 2028 y Fj(Bor)q(land)24 b(C)370 2020 y(++)0 2231
y Ft(This)c(subsection)g(describes)f(the)i(necessary)e(steps)i(to)f
(use)h(Distutils)g(with)f(the)g(Borland)g(C)2675 2224
y(++)2789 2231 y(compiler)f(v)o(ersion)g(5.5.)0 2378
y(First)g(you)e(ha)n(v)o(e)g(to)h(kno)n(w)f(that)h(Borland')-5
b(s)18 b(object)f(\002le)i(format)e(\(OMF\))h(is)h(dif)n(ferent)d(from)
h(the)h(format)f(used)g(by)h(the)g(Python)f(v)o(ersion)0
2478 y(you)22 b(can)g(do)n(wnload)e(from)i(the)g(Python)g(or)g(Acti)n
(v)o(eState)g(W)-7 b(eb)23 b(site.)33 b(\(Python)21 b(is)j(b)n(uilt)e
(with)h(Microsoft)f(V)-5 b(isual)23 b(C)3393 2471 y(++)3487
2478 y(,)g(which)f(uses)0 2577 y(COFF)i(as)g(the)g(object)e(\002le)i
(format.\))33 b(F)o(or)22 b(this)i(reason)f(you)f(ha)n(v)o(e)h(to)g
(con)m(v)o(ert)e(Python')-5 b(s)23 b(library)f(`)p Fr(p)n(ython25.lib)p
Ft(')c(into)23 b(the)h(Borland)0 2677 y(format.)g(Y)-9
b(ou)19 b(can)h(do)g(this)h(as)g(follo)n(ws:)236 2824
y Fk(coff2omf)44 b(python25.lib)f(python25_bcpp.lib)0
3110 y Ft(The)26 b(`)p Fr(coff2omf)p Ft(')g(program)e(comes)i(with)h
(the)g(Borland)f(compiler)-5 b(.)44 b(The)26 b(\002le)h(`)p
Fr(p)n(ython25.lib)p Ft(')c(is)k(in)g(the)g(`)p Fr(Libs)p
Ft(')e(directory)g(of)i(your)0 3210 y(Python)19 b(installation.)25
b(If)20 b(your)f(e)o(xtension)f(uses)j(other)e(libraries)h
(\(zlib,...\))k(you)19 b(ha)n(v)o(e)h(to)g(con)m(v)o(ert)e(them)i(too.)
0 3357 y(The)g(con)m(v)o(erted)d(\002les)22 b(ha)n(v)o(e)d(to)h(reside)
g(in)h(the)f(same)g(directories)g(as)h(the)f(normal)f(libraries.)0
3504 y(Ho)n(w)f(does)h(Distutils)g(manage)e(to)i(use)g(these)f
(libraries)h(with)f(their)h(changed)d(names?)24 b(If)19
b(the)f(e)o(xtension)f(needs)h(a)h(library)f(\(e)o(g.)23
b(`)p Fr(f)n(oo)p Ft('\))0 3603 y(Distutils)f(checks)e(\002rst)h(if)g
(it)g(\002nds)f(a)h(library)f(with)g(suf)n(\002x)h(`)p
1731 3603 23 4 v 26 w Fr(bcpp)p Ft(')f(\(e)o(g.)25 b(`)p
Fr(f)n(oo)p 2251 3603 V 25 w(bcpp)m(.lib)p Ft('\))19
b(and)h(then)g(uses)h(this)g(library)-5 b(.)24 b(In)c(the)h(case)g(it)0
3703 y(doesn')o(t)e(\002nd)h(such)g(a)g(special)g(library)g(it)g(uses)h
(the)f(def)o(ault)g(name)f(\(`)p Fr(f)n(oo)m(.lib)p Ft('.\))2271
3673 y Fc(1)0 3850 y Ft(T)-7 b(o)20 b(let)h(Distutils)g(compile)f(your)
f(e)o(xtension)f(with)j(Borland)e(C)1823 3843 y(++)1938
3850 y(you)g(no)n(w)h(ha)n(v)o(e)f(to)i(type:)236 3997
y Fk(python)44 b(setup.py)g(build)g(--compiler=bcpp)0
4283 y Ft(If)24 b(you)f(w)o(ant)h(to)h(use)f(the)g(Borland)f(C)1112
4276 y(++)1231 4283 y(compiler)g(as)i(the)f(def)o(ault,)g(you)f(could)g
(specify)h(this)g(in)h(your)e(personal)f(or)i(system-wide)0
4383 y(con\002guration)18 b(\002le)i(for)g(Distutils)h(\(see)g(section)
e(5.\))0 4530 y Fs(See)i(Also:)0 4676 y Fn(C)55 4669
y(++)167 4676 y(Builder)f(Compiler)0 4776 y Fp(\()p Fr(
http://www)l
(.bor)q(land.com/b)o(cppb)n(ui)o(ld)o(er/)o(free)o(compi)o(ler)o(/)-6
b Fp(\))208 4876 y Ft(Information)17 b(about)i(the)h(free)g(C)1157
4869 y(++)1272 4876 y(compiler)f(from)g(Borland,)g(including)f(links)j
(to)f(the)g(do)n(wnload)e(pages.)0 5023 y Fn(Cr)m(eating)i(Python)f
(Extensions)g(Using)h(Borland')m(s)f(F)-5 b(r)m(ee)21
b(Compiler)0 5122 y Fp(\()p Fr(
http://www)l(.cyber)q(us)o(.ca/\230g)p
847 5122 V 22 w(will/p)n(yExtenDL.shtml)l Fp(\))208 5222
y Ft(Document)d(describing)h(ho)n(w)g(to)i(use)f(Borland')-5
b(s)20 b(free)g(command-line)d(C)2368 5215 y(++)2462
5222 y(compiler)i(to)h(b)n(uild)g(Python.)p 0 5293 1560
4 v 90 5349 a Fb(1)120 5372 y Fo(This)c(also)i(means)f(you)g(could)i
(replace)g(all)f(e)o(xisting)h(COFF-libraries)g(with)f(OMF-libraries)h
(of)e(the)h(same)f(name.)p 0 5549 3901 4 v 0 5649 a Fj(6.2)83
b(Using)24 b(non-Microsoft)f(compilers)g(on)g(Windo)o(ws)2020
b(13)p eop end
%%Page: 14 14
TeXDict begin 14 13 bop 0 83 a Fj(GNU)23 b(C)g(/)g(Cygwin)g(/)g(MinGW)0
286 y Ft(These)j(instructions)f(only)g(apply)h(if)g(you')l(re)e(using)i
(a)g(v)o(ersion)f(of)h(Python)f(prior)g(to)i(2.4.1)d(with)j(a)f(MinGW)h
(prior)e(to)h(3.0.0)f(\(with)0 386 y(binutils-2.13.90-20030)o(11)o(1-)o
(1\))o(.)0 532 y(This)16 b(section)g(describes)g(the)g(necessary)g
(steps)g(to)h(use)f(Distutils)h(with)g(the)f(GNU)g(C/C)2501
525 y(++)2613 532 y(compilers)f(in)h(their)g(Cygwin)g(and)f(MinGW)0
632 y(distrib)n(utions.)436 602 y Fc(2)522 632 y Ft(F)o(or)29
b(a)h(Python)f(interpreter)f(that)i(w)o(as)g(b)n(uilt)g(with)g(Cygwin,)
h(e)n(v)o(erything)c(should)i(w)o(ork)g(without)g(an)o(y)g(of)g(these)0
732 y(follo)n(wing)19 b(steps.)0 879 y(These)24 b(compilers)f(require)g
(some)h(special)g(libraries.)36 b(This)24 b(task)g(is)h(more)f(comple)o
(x)e(than)h(for)h(Borland')-5 b(s)23 b(C)3226 872 y(++)3320
879 y(,)j(because)d(there)h(is)0 978 y(no)c(program)e(to)i(con)m(v)o
(ert)e(the)j(library)-5 b(.)0 1125 y(First)20 b(you)e(ha)n(v)o(e)g(to)i
(create)e(a)i(list)g(of)f(symbols)f(which)h(the)g(Python)f(DLL)h(e)o
(xports.)k(\(Y)-9 b(ou)18 b(can)h(\002nd)g(a)g(good)f(program)f(for)h
(this)i(task)f(at)0 1225 y Fr(
http://starship)m(.p)n(ython.net)o(/cre)n
(w/k)o(er)q(nr/mi)o(ng)o(w32)o(/Note)o(s)o(.ht)o(ml)-6
b Ft(,)21 b(see)f(at)h(PExports)e(0.42h)g(there.\))236
1372 y Fk(pexports)44 b(python25.dll)f(>python25.def)0
1658 y Ft(The)28 b(location)g(of)h(an)f(installed)h(`)p
Fr(p)n(ython25.dll)p Ft(')24 b(will)30 b(depend)d(on)h(the)h
(installation)f(options)g(and)g(the)h(v)o(ersion)f(and)g(language)f(of)
0 1758 y(W)m(indo)n(ws.)d(In)c(a)g(\223just)g(for)f(me\224)g
(installation,)g(it)i(will)f(appear)f(in)g(the)h(root)f(of)g(the)h
(installation)f(directory)-5 b(.)23 b(In)c(a)h(shared)f(installation,)0
1857 y(it)i(will)g(be)f(located)f(in)i(the)f(system)g(directory)-5
b(.)0 2004 y(Then)19 b(you)h(can)g(create)g(from)f(these)h(information)
e(an)i(import)f(library)g(for)h(gcc.)236 2151 y Fk(/cygwin/bin/dlltool)
42 b(--dllname)h(python25.dll)g(--def)h(python25.def)f(--output-lib)g
(libpython25.a)0 2438 y Ft(The)17 b(resulting)g(library)g(has)h(to)g
(be)g(placed)f(in)h(the)g(same)g(directory)e(as)i(`)p
Fr(p)n(ython25.lib)p Ft('.)i(\(Should)c(be)i(the)g(`)p
Fr(libs)p Ft(')e(directory)g(under)h(your)0 2537 y(Python)i
(installation)h(directory)-5 b(.\))0 2684 y(If)22 b(your)f(e)o
(xtension)f(uses)j(other)e(libraries)g(\(zlib,...\))30
b(you)21 b(might)g(ha)n(v)o(e)g(to)i(con)m(v)o(ert)d(them)h(too.)30
b(The)22 b(con)m(v)o(erted)d(\002les)k(ha)n(v)o(e)f(to)g(reside)0
2784 y(in)e(the)h(same)f(directories)f(as)i(the)f(normal)f(libraries)h
(do.)0 2931 y(T)-7 b(o)20 b(let)h(Distutils)g(compile)f(your)f(e)o
(xtension)f(with)j(Cygwin)e(you)h(no)n(w)f(ha)n(v)o(e)h(to)g(type)236
3077 y Fk(python)44 b(setup.py)g(build)g(--compiler=cygwin)0
3377 y Ft(and)20 b(for)f(Cygwin)h(in)g(no-c)o(ygwin)e(mode)1188
3347 y Fc(3)1240 3377 y Ft(or)i(for)g(MinGW)g(type:)236
3524 y Fk(python)44 b(setup.py)g(build)g(--compiler=mingw32)0
3810 y Ft(If)31 b(you)f(w)o(ant)h(to)h(use)f(an)o(y)f(of)h(these)g
(options/compilers)e(as)j(def)o(ault,)g(you)f(should)f(consider)g(to)h
(write)g(it)h(in)f(your)f(personal)g(or)0 3910 y(system-wide)19
b(con\002guration)f(\002le)j(for)e(Distutils)j(\(see)e(section)g(5.\))0
4057 y Fs(See)h(Also:)0 4204 y Fn(Building)e(Python)g(modules)g(on)h
(MS)g(W)-5 b(indows)21 b(platform)f(with)h(MinGW)0 4303
y Fp(\()p Fr(
http://www)l(.z)o(ope)o(.org/Membe)o(rs/al)o(s/tips/wi)o
(n3)o(2)p 1490 4303 23 4 v 21 w(mingw)p 1728 4303 V 25
w(modules)o Fp(\))208 4403 y Ft(Information)c(about)i(b)n(uilding)g
(the)h(required)f(libraries)g(for)h(the)g(MinGW)h(en)m(vironment.)0
4550 y Fr(http://p)n(y)o(opengl.source)o(f)n(o)o(rge)n(.ne)o(t/ft)o
(p/wi)o(n3)o(2-stu)o(ff/)208 4650 y Ft(Con)m(v)o(erted)k(import)h
(libraries)h(in)h(Cygwin/MinGW)f(and)f(Borland)h(format,)h(and)f(a)h
(script)f(to)h(create)f(the)g(re)o(gistry)g(entries)208
4749 y(needed)18 b(for)i(Distutils)h(to)g(locate)f(the)g(b)n(uilt)g
(Python.)p 0 5240 1560 4 v 90 5295 a Fb(2)120 5319 y
Fo(Check)e Fa(
http://sources)o(.redhat.com/cygwin/)23
b Fo(and)18 b Fa(
http://www)m(.mingw)m(.org/)h Fo(for)e(more)g
(information)90 5377 y Fb(3)120 5400 y Fo(Then)g(you)g(ha)o(v)o(e)h(no)
f(POSIX)f(emulation)j(a)o(v)n(ailable,)h(b)o(ut)d(you)h(also)f(don')o
(t)h(need)g(`)p Fa(cygwin1.dll)p Fo('.)p 0 5549 3901
4 v 0 5649 a Fj(14)2350 b(6)83 b(Building)26 b(Extensions:)j(Tips)22
b(and)i(T)-10 b(r)q(ic)n(ks)p eop end
%%Trailer
userdict /end-hook known{end-hook}if
%%EOF