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
Boxiang Sun
cython
Commits
9382558d
Commit
9382558d
authored
Sep 18, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XML results for hudson.
parent
9eff1d3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
10 deletions
+52
-10
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+52
-10
No files found.
Cython/Build/Dependencies.py
View file @
9382558d
...
...
@@ -2,7 +2,7 @@ import cython
from
Cython
import
__version__
from
glob
import
glob
import
re
,
os
,
sys
import
re
,
os
,
sys
,
time
try
:
import
gzip
gzip_open
=
gzip
.
open
...
...
@@ -336,6 +336,20 @@ def resolve_depend(depend, include_dirs):
return
os
.
path
.
normpath
(
path
)
return
None
@
cached_function
def
package
(
filename
):
dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
str
(
filename
)))
if
dir
!=
filename
and
path_exists
(
join_path
(
dir
,
'__init__.py'
)):
return
package
(
dir
)
+
(
os
.
path
.
basename
(
dir
),)
else
:
return
()
@
cached_function
def
fully_qualifeid_name
(
filename
):
module
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
filename
))[
0
]
return
'.'
.
join
(
package
(
filename
)
+
(
module
,))
@
cached_function
def
parse_dependencies
(
source_filename
):
# Actual parsing is way to slow, so we use regular expressions.
...
...
@@ -411,18 +425,11 @@ class DependencyTree(object):
def
cimports
(
self
,
filename
):
return
self
.
cimports_and_externs
(
filename
)[
0
]
@
cached_method
def
package
(
self
,
filename
):
dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
str
(
filename
)))
if
dir
!=
filename
and
path_exists
(
join_path
(
dir
,
'__init__.py'
)):
return
self
.
package
(
dir
)
+
(
os
.
path
.
basename
(
dir
),)
else
:
return
()
return
package
(
filename
)
@
cached_method
def
fully_qualifeid_name
(
self
,
filename
):
module
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
filename
))[
0
]
return
'.'
.
join
(
self
.
package
(
filename
)
+
(
module
,))
return
fully_qualifeid_name
(
filename
)
@
cached_method
def
find_pxd
(
self
,
module
,
filename
=
None
):
...
...
@@ -789,7 +796,42 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
sys
.
stdout
.
flush
()
return
module_list
if
os
.
environ
[
'XML_RESULTS'
]:
compile_result_dir
=
os
.
environ
[
'XML_RESULTS'
]
def
record_results
(
func
):
def
with_record
(
*
args
):
try
:
t
=
time
.
time
()
success
=
True
func
(
*
args
)
except
:
success
=
False
finally
:
t
=
time
.
time
()
-
t
module
=
fully_qualifeid_name
(
args
[
0
])
name
=
"cythonize."
+
module
failures
=
1
-
success
if
success
:
failure_item
=
""
else
:
failure_item
=
"failure"
output
=
open
(
os
.
path
.
join
(
compile_result_dir
,
name
+
".xml"
),
"w"
)
output
.
write
(
"""
<?xml version="1.0" ?>
<testsuite name="%(name)s" errors="0" failures="%(failures)s" tests="1" time="%(t)s">
<testcase classname="%(name)s" name="cythonize">
%(failure_item)s
</testcase>
</testsuite>
"""
.
strip
()
%
locals
())
output
.
close
()
return
with_record
else
:
record_results
=
lambda
x
:
x
# TODO: Share context? Issue: pyx processing leaks into pxd module
@
record_results
def
cythonize_one
(
pyx_file
,
c_file
,
fingerprint
,
quiet
,
options
=
None
,
raise_on_failure
=
True
):
from
Cython.Compiler.Main
import
compile
,
default_options
from
Cython.Compiler.Errors
import
CompileError
,
PyrexError
...
...
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