Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
2 | <html> | |
3 | <head> | |
4 | <link rel="STYLESHEET" href="dist.css" type='text/css' /> | |
5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> | |
6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> | |
7 | <link rel="first" href="dist.html" title='Distributing Python Modules' /> | |
8 | <link rel='index' href='genindex.html' title='Index' /> | |
9 | <link rel='last' href='about.html' title='About this document...' /> | |
10 | <link rel='help' href='about.html' title='About this document...' /> | |
11 | <link rel="next" href="module-distutils.textfile.html" /> | |
12 | <link rel="prev" href="module-distutils.spawn.html" /> | |
13 | <link rel="parent" href="api-reference.html" /> | |
14 | <link rel="next" href="module-distutils.textfile.html" /> | |
15 | <meta name='aesop' content='information' /> | |
16 | <title>10.22 distutils.sysconfig -- System configuration information</title> | |
17 | </head> | |
18 | <body> | |
19 | <DIV CLASS="navigation"> | |
20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> | |
21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
22 | <tr> | |
23 | <td class='online-navigation'><a rel="prev" title="10.21 distutils.spawn " | |
24 | href="module-distutils.spawn.html"><img src='../icons/previous.png' | |
25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
26 | <td class='online-navigation'><a rel="parent" title="10. API Reference" | |
27 | href="api-reference.html"><img src='../icons/up.png' | |
28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
29 | <td class='online-navigation'><a rel="next" title="10.23 distutils.text_file " | |
30 | href="module-distutils.textfile.html"><img src='../icons/next.png' | |
31 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
32 | <td align="center" width="100%">Distributing Python Modules</td> | |
33 | <td class='online-navigation'><img src='../icons/blank.png' | |
34 | border='0' height='32' alt='' width='32' /></td> | |
35 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
36 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
37 | <td class='online-navigation'><a rel="index" title="Index" | |
38 | href="genindex.html"><img src='../icons/index.png' | |
39 | border='0' height='32' alt='Index' width='32' /></A></td> | |
40 | </tr></table> | |
41 | <div class='online-navigation'> | |
42 | <b class="navlabel">Previous:</b> | |
43 | <a class="sectref" rel="prev" href="module-distutils.spawn.html">10.21 distutils.spawn </A> | |
44 | <b class="navlabel">Up:</b> | |
45 | <a class="sectref" rel="parent" href="api-reference.html">10. API Reference</A> | |
46 | <b class="navlabel">Next:</b> | |
47 | <a class="sectref" rel="next" href="module-distutils.textfile.html">10.23 distutils.text_file </A> | |
48 | </div> | |
49 | <hr /></div> | |
50 | </DIV> | |
51 | <!--End of Navigation Panel--> | |
52 | ||
53 | <H1><A NAME="SECTION00102200000000000000000"> | |
54 | 10.22 <tt class="module">distutils.sysconfig</tt> -- | |
55 | System configuration information</A> | |
56 | </H1> | |
57 | ||
58 | <P> | |
59 | <A NAME="module-distutils.sysconfig"></A> | |
60 | ||
61 | <P> | |
62 | The <tt class="module">distutils.sysconfig</tt> module provides access to Python's | |
63 | low-level configuration information. The specific configuration | |
64 | variables available depend heavily on the platform and configuration. | |
65 | The specific variables depend on the build process for the specific | |
66 | version of Python being run; the variables are those found in the | |
67 | <span class="file">Makefile</span> and configuration header that are installed with | |
68 | Python on <span class="Unix">Unix</span> systems. The configuration header is called | |
69 | <span class="file">pyconfig.h</span> for Python versions starting with 2.2, and | |
70 | <span class="file">config.h</span> for earlier versions of Python. | |
71 | ||
72 | <P> | |
73 | Some additional functions are provided which perform some useful | |
74 | manipulations for other parts of the <tt class="module">distutils</tt> package. | |
75 | ||
76 | <P> | |
77 | <dl><dt><b><tt id='l2h-107' xml:id='l2h-107'>PREFIX</tt></b></dt> | |
78 | <dd> | |
79 | The result of <code>os.path.normpath(sys.prefix)</code>. | |
80 | </dd></dl> | |
81 | ||
82 | <P> | |
83 | <dl><dt><b><tt id='l2h-108' xml:id='l2h-108'>EXEC_PREFIX</tt></b></dt> | |
84 | <dd> | |
85 | The result of <code>os.path.normpath(sys.exec_prefix)</code>. | |
86 | </dd></dl> | |
87 | ||
88 | <P> | |
89 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
90 | <td><nobr><b><tt id='l2h-109' xml:id='l2h-109' class="function">get_config_var</tt></b>(</nobr></td> | |
91 | <td><var>name</var>)</td></tr></table></dt> | |
92 | <dd> | |
93 | Return the value of a single variable. This is equivalent to | |
94 | <code>get_config_vars().get(<var>name</var>)</code>. | |
95 | </dl> | |
96 | ||
97 | <P> | |
98 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
99 | <td><nobr><b><tt id='l2h-110' xml:id='l2h-110' class="function">get_config_vars</tt></b>(</nobr></td> | |
100 | <td><var>...</var>)</td></tr></table></dt> | |
101 | <dd> | |
102 | Return a set of variable definitions. If there are no arguments, | |
103 | this returns a dictionary mapping names of configuration variables | |
104 | to values. If arguments are provided, they should be strings, and | |
105 | the return value will be a sequence giving the associated values. | |
106 | If a given name does not have a corresponding value, <code>None</code> | |
107 | will be included for that variable. | |
108 | </dl> | |
109 | ||
110 | <P> | |
111 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
112 | <td><nobr><b><tt id='l2h-111' xml:id='l2h-111' class="function">get_config_h_filename</tt></b>(</nobr></td> | |
113 | <td><var></var>)</td></tr></table></dt> | |
114 | <dd> | |
115 | Return the full path name of the configuration header. For <span class="Unix">Unix</span>, | |
116 | this will be the header generated by the <b class="program">configure</b> script; | |
117 | for other platforms the header will have been supplied directly by | |
118 | the Python source distribution. The file is a platform-specific | |
119 | text file. | |
120 | </dl> | |
121 | ||
122 | <P> | |
123 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
124 | <td><nobr><b><tt id='l2h-112' xml:id='l2h-112' class="function">get_makefile_filename</tt></b>(</nobr></td> | |
125 | <td><var></var>)</td></tr></table></dt> | |
126 | <dd> | |
127 | Return the full path name of the <span class="file">Makefile</span> used to build | |
128 | Python. For <span class="Unix">Unix</span>, this will be a file generated by the | |
129 | <b class="program">configure</b> script; the meaning for other platforms will | |
130 | vary. The file is a platform-specific text file, if it exists. | |
131 | This function is only useful on POSIX platforms. | |
132 | </dl> | |
133 | ||
134 | <P> | |
135 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
136 | <td><nobr><b><tt id='l2h-113' xml:id='l2h-113' class="function">get_python_inc</tt></b>(</nobr></td> | |
137 | <td><var></var><big>[</big><var>plat_specific</var><big>[</big><var>, prefix</var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt> | |
138 | <dd> | |
139 | Return the directory for either the general or platform-dependent C | |
140 | include files. If <var>plat_specific</var> is true, the | |
141 | platform-dependent include directory is returned; if false or | |
142 | omitted, the platform-independent directory is returned. If | |
143 | <var>prefix</var> is given, it is used as either the prefix instead of | |
144 | <tt class="constant">PREFIX</tt>, or as the exec-prefix instead of | |
145 | <tt class="constant">EXEC_PREFIX</tt> if <var>plat_specific</var> is true. | |
146 | </dl> | |
147 | ||
148 | <P> | |
149 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
150 | <td><nobr><b><tt id='l2h-114' xml:id='l2h-114' class="function">get_python_lib</tt></b>(</nobr></td> | |
151 | <td><var></var><big>[</big><var>plat_specific</var><big>[</big><var>, | |
152 | standard_lib</var><big>[</big><var>, prefix</var><big>]</big><var></var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt> | |
153 | <dd> | |
154 | Return the directory for either the general or platform-dependent | |
155 | library installation. If <var>plat_specific</var> is true, the | |
156 | platform-dependent include directory is returned; if false or | |
157 | omitted, the platform-independent directory is returned. If | |
158 | <var>prefix</var> is given, it is used as either the prefix instead of | |
159 | <tt class="constant">PREFIX</tt>, or as the exec-prefix instead of | |
160 | <tt class="constant">EXEC_PREFIX</tt> if <var>plat_specific</var> is true. If | |
161 | <var>standard_lib</var> is true, the directory for the standard library | |
162 | is returned rather than the directory for the installation of | |
163 | third-party extensions. | |
164 | </dl> | |
165 | ||
166 | <P> | |
167 | The following function is only intended for use within the | |
168 | <tt class="module">distutils</tt> package. | |
169 | ||
170 | <P> | |
171 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
172 | <td><nobr><b><tt id='l2h-115' xml:id='l2h-115' class="function">customize_compiler</tt></b>(</nobr></td> | |
173 | <td><var>compiler</var>)</td></tr></table></dt> | |
174 | <dd> | |
175 | Do any platform-specific customization of a | |
176 | <tt class="class">distutils.ccompiler.CCompiler</tt> instance. | |
177 | ||
178 | <P> | |
179 | This function is only needed on <span class="Unix">Unix</span> at this time, but should be | |
180 | called consistently to support forward-compatibility. It inserts | |
181 | the information that varies across <span class="Unix">Unix</span> flavors and is stored in | |
182 | Python's <span class="file">Makefile</span>. This information includes the selected | |
183 | compiler, compiler and linker options, and the extension used by the | |
184 | linker for shared objects. | |
185 | </dl> | |
186 | ||
187 | <P> | |
188 | This function is even more special-purpose, and should only be used | |
189 | from Python's own build procedures. | |
190 | ||
191 | <P> | |
192 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> | |
193 | <td><nobr><b><tt id='l2h-116' xml:id='l2h-116' class="function">set_python_build</tt></b>(</nobr></td> | |
194 | <td><var></var>)</td></tr></table></dt> | |
195 | <dd> | |
196 | Inform the <tt class="module">distutils.sysconfig</tt> module that it is being used | |
197 | as part of the build process for Python. This changes a lot of | |
198 | relative locations for files, allowing them to be located in the | |
199 | build area rather than in an installed Python. | |
200 | </dl> | |
201 | ||
202 | <P> | |
203 | ||
204 | <DIV CLASS="navigation"> | |
205 | <div class='online-navigation'> | |
206 | <p></p><hr /> | |
207 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> | |
208 | <tr> | |
209 | <td class='online-navigation'><a rel="prev" title="10.21 distutils.spawn " | |
210 | href="module-distutils.spawn.html"><img src='../icons/previous.png' | |
211 | border='0' height='32' alt='Previous Page' width='32' /></A></td> | |
212 | <td class='online-navigation'><a rel="parent" title="10. API Reference" | |
213 | href="api-reference.html"><img src='../icons/up.png' | |
214 | border='0' height='32' alt='Up One Level' width='32' /></A></td> | |
215 | <td class='online-navigation'><a rel="next" title="10.23 distutils.text_file " | |
216 | href="module-distutils.textfile.html"><img src='../icons/next.png' | |
217 | border='0' height='32' alt='Next Page' width='32' /></A></td> | |
218 | <td align="center" width="100%">Distributing Python Modules</td> | |
219 | <td class='online-navigation'><img src='../icons/blank.png' | |
220 | border='0' height='32' alt='' width='32' /></td> | |
221 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' | |
222 | border='0' height='32' alt='Module Index' width='32' /></a></td> | |
223 | <td class='online-navigation'><a rel="index" title="Index" | |
224 | href="genindex.html"><img src='../icons/index.png' | |
225 | border='0' height='32' alt='Index' width='32' /></A></td> | |
226 | </tr></table> | |
227 | <div class='online-navigation'> | |
228 | <b class="navlabel">Previous:</b> | |
229 | <a class="sectref" rel="prev" href="module-distutils.spawn.html">10.21 distutils.spawn </A> | |
230 | <b class="navlabel">Up:</b> | |
231 | <a class="sectref" rel="parent" href="api-reference.html">10. API Reference</A> | |
232 | <b class="navlabel">Next:</b> | |
233 | <a class="sectref" rel="next" href="module-distutils.textfile.html">10.23 distutils.text_file </A> | |
234 | </div> | |
235 | </div> | |
236 | <hr /> | |
237 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> | |
238 | </DIV> | |
239 | <!--End of Navigation Panel--> | |
240 | <ADDRESS> | |
241 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. | |
242 | </ADDRESS> | |
243 | </BODY> | |
244 | </HTML> |