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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
45853041
Commit
45853041
authored
Nov 20, 2014
by
Michael Helmling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setup.py method of setting compiler directives
parent
4bd204aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
docs/src/reference/compilation.rst
docs/src/reference/compilation.rst
+18
-0
No files found.
docs/src/reference/compilation.rst
View file @
45853041
...
...
@@ -454,3 +454,21 @@ statement, like this::
.. Warning:: These two methods of setting directives are **not**
affected by overriding the directive on the command-line using the
-X option.
In :file:`setup.py`
:::::::::::::::::::
Compiler directives can also be set in the :file:`setup.py` file by passing a keyword
argument to ``cythonize``::
from distutils.core import setup
from Cython.Build import cythonize
setup(
name = "My hello app",
ext_modules = cythonize('hello.pyx', compiler_directives={'embedsignature': True}),
)
This will override the default directives as specified in the ``compiler_directives`` dictionary.
Note that explicit per-file or local directives as explained above take precedence over the
values passed to ``cythonize``.
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