Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
cython
Commits
c1c49f84
Commit
c1c49f84
authored
14 years ago
by
Robert Bradshaw
Browse files
Options
Download
Email Patches
Plain Diff
Complicated cythonize setup.
parent
2edd9045
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+2
-2
tests/build/cythonize_options.srctree
tests/build/cythonize_options.srctree
+29
-0
No files found.
Cython/Build/Dependencies.py
View file @
c1c49f84
...
@@ -424,8 +424,8 @@ def create_extension_list(patterns, ctx=None, aliases=None):
...
@@ -424,8 +424,8 @@ def create_extension_list(patterns, ctx=None, aliases=None):
# This is the user-exposed entry point.
# This is the user-exposed entry point.
def
cythonize
(
module_list
,
nthreads
=
0
,
aliases
=
None
,
**
options
):
def
cythonize
(
module_list
,
nthreads
=
0
,
aliases
=
None
,
**
options
):
c_options
=
CompilationOptions
(
options
)
c_options
=
CompilationOptions
(
**
options
)
cpp_options
=
CompilationOptions
(
options
);
cpp_options
.
cplus
=
True
cpp_options
=
CompilationOptions
(
**
options
);
cpp_options
.
cplus
=
True
ctx
=
c_options
.
create_context
()
ctx
=
c_options
.
create_context
()
module_list
=
create_extension_list
(
module_list
,
ctx
=
ctx
,
aliases
=
aliases
)
module_list
=
create_extension_list
(
module_list
,
ctx
=
ctx
,
aliases
=
aliases
)
deps
=
create_dependency_tree
(
ctx
)
deps
=
create_dependency_tree
(
ctx
)
...
...
This diff is collapsed.
Click to expand it.
tests/build/cythonize_options.srctree
0 → 100644
View file @
c1c49f84
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
######## setup.py ########
from Cython.Build.Dependencies import cythonize
from distutils.core import setup
setup(
ext_modules = cythonize("*.pyx", include_path=['subdir'], compiler_directives={'cdivision': True}),
)
######## a.pyx ########
cimport x
include "y.pxi"
# cdivision from setup.py
def mod_int_c(int a, int b):
return a % b
assert mod_int_c(-1, 10) < 0
######## subdir/x.pxd ########
######## subdir/y.pxi ########
This diff is collapsed.
Click to expand it.
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