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
Kirill Smelkov
cython
Commits
a5c06ead
Commit
a5c06ead
authored
Aug 31, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorporate William Stein's cythonize() suggestions.
parent
9cb4f067
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+6
-4
No files found.
Cython/Build/Dependencies.py
View file @
a5c06ead
...
...
@@ -438,7 +438,7 @@ def create_extension_list(patterns, exclude=[], ctx=None, aliases=None):
return
module_list
# This is the user-exposed entry point.
def
cythonize
(
module_list
,
exclude
=
[],
nthreads
=
0
,
aliases
=
None
,
quiet
=
False
,
**
options
):
def
cythonize
(
module_list
,
exclude
=
[],
nthreads
=
0
,
aliases
=
None
,
quiet
=
False
,
force
=
False
,
**
options
):
if
'include_path'
not
in
options
:
options
[
'include_path'
]
=
[
'.'
]
c_options
=
CompilationOptions
(
**
options
)
...
...
@@ -474,7 +474,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, **
else
:
dep_timestamp
,
dep
=
deps
.
newest_dependency
(
source
)
priority
=
2
-
(
dep
in
deps
.
immediate_dependencies
(
source
))
if
c_timestamp
<
dep_timestamp
:
if
force
or
c_timestamp
<
dep_timestamp
:
if
not
quiet
:
if
source
==
dep
:
print
(
"Compiling %s because it changed."
%
source
)
...
...
@@ -497,14 +497,16 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, **
nthreads
=
0
if
not
nthreads
:
for
priority
,
pyx_file
,
c_file
,
options
in
to_compile
:
cythonize_one
(
pyx_file
,
c_file
,
options
)
cythonize_one
(
pyx_file
,
c_file
,
quiet
,
options
)
return
module_list
# TODO: Share context? Issue: pyx processing leaks into pxd module
def
cythonize_one
(
pyx_file
,
c_file
,
options
=
None
):
def
cythonize_one
(
pyx_file
,
c_file
,
quiet
,
options
=
None
):
from
Cython.Compiler.Main
import
compile
,
default_options
from
Cython.Compiler.Errors
import
CompileError
,
PyrexError
if
not
quiet
:
print
"Cythonizing %s"
%
pyx_file
if
options
is
None
:
options
=
CompilationOptions
(
default_options
)
options
.
output_file
=
c_file
...
...
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