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
5d1fddb8
Commit
5d1fddb8
authored
May 05, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix multi-threaded cythonize
parent
6dc1f60c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+3
-3
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+6
-0
No files found.
Cython/Build/Dependencies.py
View file @
5d1fddb8
...
@@ -523,7 +523,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
...
@@ -523,7 +523,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
print
(
"Compiling %s because it changed."
%
source
)
print
(
"Compiling %s because it changed."
%
source
)
else
:
else
:
print
(
"Compiling %s because it depends on %s."
%
(
source
,
dep
))
print
(
"Compiling %s because it depends on %s."
%
(
source
,
dep
))
to_compile
.
append
((
priority
,
source
,
c_file
,
options
))
to_compile
.
append
((
priority
,
source
,
c_file
,
quiet
,
options
))
new_sources
.
append
(
c_file
)
new_sources
.
append
(
c_file
)
else
:
else
:
new_sources
.
append
(
source
)
new_sources
.
append
(
source
)
...
@@ -539,7 +539,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
...
@@ -539,7 +539,7 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
print
(
"multiprocessing required for parallel cythonization"
)
print
(
"multiprocessing required for parallel cythonization"
)
nthreads
=
0
nthreads
=
0
if
not
nthreads
:
if
not
nthreads
:
for
priority
,
pyx_file
,
c_file
,
options
in
to_compile
:
for
priority
,
pyx_file
,
c_file
,
quiet
,
options
in
to_compile
:
cythonize_one
(
pyx_file
,
c_file
,
quiet
,
options
)
cythonize_one
(
pyx_file
,
c_file
,
quiet
,
options
)
return
module_list
return
module_list
...
@@ -549,7 +549,7 @@ def cythonize_one(pyx_file, c_file, quiet, options=None):
...
@@ -549,7 +549,7 @@ def cythonize_one(pyx_file, c_file, quiet, options=None):
from
Cython.Compiler.Errors
import
CompileError
,
PyrexError
from
Cython.Compiler.Errors
import
CompileError
,
PyrexError
if
not
quiet
:
if
not
quiet
:
print
"Cythonizing %s"
%
pyx_file
print
(
"Cythonizing"
,
pyx_file
)
if
options
is
None
:
if
options
is
None
:
options
=
CompilationOptions
(
default_options
)
options
=
CompilationOptions
(
default_options
)
options
.
output_file
=
c_file
options
.
output_file
=
c_file
...
...
Cython/Compiler/Errors.py
View file @
5d1fddb8
...
@@ -52,6 +52,9 @@ class CompileError(PyrexError):
...
@@ -52,6 +52,9 @@ class CompileError(PyrexError):
# Deprecated and withdrawn in 2.6:
# Deprecated and withdrawn in 2.6:
# self.message = message
# self.message = message
Exception
.
__init__
(
self
,
format_error
(
message
,
position
))
Exception
.
__init__
(
self
,
format_error
(
message
,
position
))
# Python Exception subclass pickling is broken,
# see http://bugs.python.org/issue1692335
self
.
args
=
(
position
,
message
)
class
CompileWarning
(
PyrexWarning
):
class
CompileWarning
(
PyrexWarning
):
...
@@ -96,6 +99,9 @@ class CompilerCrash(CompileError):
...
@@ -96,6 +99,9 @@ class CompilerCrash(CompileError):
message
+=
u'
\
n
'
message
+=
u'
\
n
'
message
+=
u'%s: %s'
%
(
cause
.
__class__
.
__name__
,
cause
)
message
+=
u'%s: %s'
%
(
cause
.
__class__
.
__name__
,
cause
)
CompileError
.
__init__
(
self
,
pos
,
message
)
CompileError
.
__init__
(
self
,
pos
,
message
)
# Python Exception subclass pickling is broken,
# see http://bugs.python.org/issue1692335
self
.
args
=
(
pos
,
context
,
message
,
cause
,
stacktrace
)
class
NoElementTreeInstalledException
(
PyrexError
):
class
NoElementTreeInstalledException
(
PyrexError
):
"""raised when the user enabled options.gdb_debug but no ElementTree
"""raised when the user enabled options.gdb_debug but no ElementTree
...
...
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