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
7f7851f7
Commit
7f7851f7
authored
Nov 20, 2014
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #337 from supermihi/master
Add setup.py method of setting compiler directives
parents
4bd204aa
45853041
Changes
1
Show 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 @
7f7851f7
...
...
@@ -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