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
Gwenaël Samain
cython
Commits
92bdeb20
Commit
92bdeb20
authored
Sep 12, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cython path.
parent
2fa4df3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
Cython/Compiler/Dependencies.py
Cython/Compiler/Dependencies.py
+2
-1
runtests.py
runtests.py
+4
-3
No files found.
Cython/Compiler/Dependencies.py
View file @
92bdeb20
...
@@ -334,6 +334,8 @@ def create_extension_list(filepatterns, ctx=None):
...
@@ -334,6 +334,8 @@ def create_extension_list(filepatterns, ctx=None):
module_list
.
append
(
Extension
(
name
=
name
,
sources
=
[
file
],
**
deps
.
distutils_info
(
file
).
values
))
module_list
.
append
(
Extension
(
name
=
name
,
sources
=
[
file
],
**
deps
.
distutils_info
(
file
).
values
))
return
module_list
return
module_list
cython_py
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../../cython.py'
))
def
cythonize
(
module_list
,
ctx
=
None
):
def
cythonize
(
module_list
,
ctx
=
None
):
deps
=
create_dependency_tree
(
ctx
)
deps
=
create_dependency_tree
(
ctx
)
to_compile
=
[]
to_compile
=
[]
...
@@ -365,7 +367,6 @@ def cythonize(module_list, ctx=None):
...
@@ -365,7 +367,6 @@ def cythonize(module_list, ctx=None):
m
.
sources
=
new_sources
m
.
sources
=
new_sources
to_compile
.
sort
()
to_compile
.
sort
()
# TODO: invoke directly
# TODO: invoke directly
cython_py
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../../cython.py'
)
for
priority
,
pyx_file
,
c_file
in
to_compile
:
for
priority
,
pyx_file
,
c_file
in
to_compile
:
cmd
=
"%s %s %s -o %s"
%
(
sys
.
executable
,
cython_py
,
pyx_file
,
c_file
)
cmd
=
"%s %s %s -o %s"
%
(
sys
.
executable
,
cython_py
,
pyx_file
,
c_file
)
print
cmd
print
cmd
...
...
runtests.py
View file @
92bdeb20
...
@@ -634,6 +634,8 @@ class EndToEndTest(unittest.TestCase):
...
@@ -634,6 +634,8 @@ class EndToEndTest(unittest.TestCase):
This is a test of build/*.srctree files, where srctree defines a full
This is a test of build/*.srctree files, where srctree defines a full
directory structure and its header gives a list of commands to run.
directory structure and its header gives a list of commands to run.
"""
"""
cython_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
def
__init__
(
self
,
treefile
,
workdir
,
cleanup_workdir
=
True
):
def
__init__
(
self
,
treefile
,
workdir
,
cleanup_workdir
=
True
):
self
.
treefile
=
treefile
self
.
treefile
=
treefile
self
.
workdir
=
os
.
path
.
join
(
workdir
,
os
.
path
.
splitext
(
treefile
)[
0
])
self
.
workdir
=
os
.
path
.
join
(
workdir
,
os
.
path
.
splitext
(
treefile
)[
0
])
...
@@ -657,14 +659,13 @@ class EndToEndTest(unittest.TestCase):
...
@@ -657,14 +659,13 @@ class EndToEndTest(unittest.TestCase):
os
.
chdir
(
self
.
old_dir
)
os
.
chdir
(
self
.
old_dir
)
def
runTest
(
self
):
def
runTest
(
self
):
# Assumes old_dir is root of the cython directory...
commands
=
(
self
.
commands
commands
=
(
self
.
commands
.
replace
(
"CYTHON"
,
"PYTHON %s"
%
os
.
path
.
join
(
self
.
old_dir
,
'cython.py'
))
.
replace
(
"CYTHON"
,
"PYTHON %s"
%
os
.
path
.
join
(
self
.
cython_root
,
'cython.py'
))
.
replace
(
"PYTHON"
,
sys
.
executable
))
.
replace
(
"PYTHON"
,
sys
.
executable
))
commands
=
"""
commands
=
"""
PYTHONPATH="%s%s$PYTHONPATH"
PYTHONPATH="%s%s$PYTHONPATH"
%s
%s
"""
%
(
self
.
old_dir
,
os
.
pathsep
,
commands
)
"""
%
(
self
.
cython_root
,
os
.
pathsep
,
commands
)
self
.
assertEqual
(
0
,
os
.
system
(
commands
))
self
.
assertEqual
(
0
,
os
.
system
(
commands
))
...
...
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