Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
6927307e
Commit
6927307e
authored
Jul 08, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some text from reference/compilation.rst to userguide/source_file_and_compilation.rst.
parent
fbb308c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
docs/src/userguide/source_files_and_compilation.rst
docs/src/userguide/source_files_and_compilation.rst
+16
-1
No files found.
docs/src/userguide/source_files_and_compilation.rst
View file @
6927307e
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment