Commit 6927307e authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Moved some text from reference/compilation.rst to userguide/source_file_and_compilation.rst.

parent fbb308c4
...@@ -12,8 +12,23 @@ Cython source file names consist of the name of the module followed by a ...@@ -12,8 +12,23 @@ Cython source file names consist of the name of the module followed by a
``.pyx`` extension, for example a module called primes would have a source ``.pyx`` extension, for example a module called primes would have a source
file named :file:`primes.pyx`. file named :file:`primes.pyx`.
Cython code, unlike Python, must be compiled. This happens in two stages:
* A ``.pyx`` file is compiled by Cython to a ``.c`` file.
* The ``.c`` file is compiled by a C compiler to a ``.so`` file (or a
``.pyd`` file on Windows)
Once you have written your ``.pyx`` file, there are a couple of ways of turning it Once you have written your ``.pyx`` file, there are a couple of ways of turning it
into an extension module. One way is to compile it manually with the Cython into an extension module.
The following sub-sections describe several ways to build your
extension modules, and how to pass directives to the Cython compiler.
Compiling from the command line
===============================
One way is to compile it manually with the Cython
compiler, e.g.: compiler, e.g.:
.. sourcecode:: text .. sourcecode:: text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment