|
Original |
Translation |
|
190
|
module ... [sourcefile ...] [cpparg ...] [library ...]
|
|
|
191
|
Let's examine each of the fields in turn.
|
|
|
192
|
*module* is the name of the extension module to be built, and should be a valid Python identifier. You can't just change this in order to rename a module (edits to the source code would also be needed), so this should be left alone.
|
|
|
193
|
*sourcefile* is anything that's likely to be a source code file, at least judging by the filename. Filenames ending in :file:`.c` are assumed to be written in C, filenames ending in :file:`.C`, :file:`.cc`, and :file:`.c++` are assumed to be C++, and filenames ending in :file:`.m` or :file:`.mm` are assumed to be in Objective C.
|
|
|
194
|
|
195
|
*library* is anything ending in :file:`.a` or beginning with :option:`-l` or :option:`-L`.
|
|
|
196
|
If a particular platform requires a special library on your platform, you can add it by editing the :file:`Setup` file and running ``python setup.py build``. For example, if the module defined by the line ::
|
|
|
197
|
|
|
|
198
|
must be linked with the math library :file:`libm.a` on your platform, simply add :option:`-lm` to the line::
|
|
|
199
|
|
|