|
Original |
Translation |
|
181
|
and you can find out the complete list of global options by using :option:`--help` without a command::
|
|
|
182
|
|
|
|
183
|
See also the "Reference" section of the "Distributing Python Modules" manual.
|
|
|
184
|
Building Extensions: Tips and Tricks
|
|
|
185
|
|
186
|
Tweaking compiler/linker flags
|
|
|
187
|
Compiling a Python extension written in C or C++ will sometimes require specifying custom flags for the compiler and linker in order to use a particular library or produce a special kind of object code. This is especially true if the extension hasn't been tested on your platform, or if you're trying to cross-compile Python.
|
|
|
188
|
In the most general case, the extension author might have foreseen that compiling the extensions would be complicated, and provided a :file:`Setup` file for you to edit. This will likely only be done if the module distribution contains many separate extension modules, or if they often require elaborate sets of compiler flags in order to work.
|
|
|
189
|
A :file:`Setup` file, if present, is parsed in order to get a list of extensions to build. Each line in a :file:`Setup` describes a single module. Lines have the following structure::
|
|
|
190
|
module ... [sourcefile ...] [cpparg ...] [library ...]
|
|