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
673f1210
Commit
673f1210
authored
Aug 02, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppress more output in cythonize() when 'quiet' flag is passed
parent
8880c78f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+12
-11
No files found.
Cython/Build/Dependencies.py
View file @
673f1210
...
...
@@ -326,8 +326,9 @@ def parse_dependencies(source_filename):
class
DependencyTree
(
object
):
def
__init__
(
self
,
context
):
def
__init__
(
self
,
context
,
quiet
=
False
):
self
.
context
=
context
self
.
quiet
=
quiet
self
.
_transitive_cache
=
{}
def
parse_dependencies
(
self
,
source_filename
):
...
...
@@ -347,7 +348,7 @@ class DependencyTree(object):
include_path
=
os
.
path
.
normpath
(
include_path
)
all
.
add
(
include_path
)
all
.
update
(
self
.
included_files
(
include_path
))
el
se
:
el
if
not
self
.
quiet
:
print
(
"Unable to locate '%s' referenced from '%s'"
%
(
filename
,
include
))
return
all
...
...
@@ -401,11 +402,10 @@ class DependencyTree(object):
if
module
[:
7
]
==
'cython.'
or
module
==
'cython'
:
continue
pxd_file
=
self
.
find_pxd
(
module
,
filename
)
if
pxd_file
is
None
:
print
(
"missing cimport: %s"
%
filename
)
print
(
module
)
else
:
if
pxd_file
is
not
None
:
pxd_list
.
append
(
pxd_file
)
elif
not
self
.
quiet
:
print
(
"missing cimport in module '%s': %s"
%
(
module
,
filename
))
return
tuple
(
pxd_list
)
@
cached_method
...
...
@@ -490,19 +490,19 @@ class DependencyTree(object):
del
stack
[
node
]
_dep_tree
=
None
def
create_dependency_tree
(
ctx
=
None
):
def
create_dependency_tree
(
ctx
=
None
,
quiet
=
False
):
global
_dep_tree
if
_dep_tree
is
None
:
if
ctx
is
None
:
ctx
=
Context
([
"."
],
CompilationOptions
(
default_options
))
_dep_tree
=
DependencyTree
(
ctx
)
_dep_tree
=
DependencyTree
(
ctx
,
quiet
=
quiet
)
return
_dep_tree
# This may be useful for advanced users?
def
create_extension_list
(
patterns
,
exclude
=
[],
ctx
=
None
,
aliases
=
None
):
def
create_extension_list
(
patterns
,
exclude
=
[],
ctx
=
None
,
aliases
=
None
,
quiet
=
False
):
explicit_modules
=
set
([
m
.
name
for
m
in
patterns
if
isinstance
(
m
,
Extension
)])
seen
=
set
()
deps
=
create_dependency_tree
(
ctx
)
deps
=
create_dependency_tree
(
ctx
,
quiet
=
quiet
)
to_exclude
=
set
()
if
not
isinstance
(
exclude
,
list
):
exclude
=
[
exclude
]
...
...
@@ -575,8 +575,9 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
module_list
,
exclude
=
exclude
,
ctx
=
ctx
,
quiet
=
quiet
,
aliases
=
aliases
)
deps
=
create_dependency_tree
(
ctx
)
deps
=
create_dependency_tree
(
ctx
,
quiet
=
quiet
)
to_compile
=
[]
for
m
in
module_list
:
new_sources
=
[]
...
...
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