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
67c183d5
Commit
67c183d5
authored
May 27, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove broken recursive option.
parent
c144c807
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
41 deletions
+3
-41
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+0
-6
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+3
-19
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+0
-16
No files found.
Cython/Compiler/CmdLine.py
View file @
67c183d5
...
@@ -43,10 +43,6 @@ Options:
...
@@ -43,10 +43,6 @@ Options:
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
"""
"""
# The following is broken http://trac.cython.org/cython_trac/ticket/379
# -r, --recursive Recursively find and compile dependencies (implies -t)
#The following experimental options are supported only on MacOSX:
#The following experimental options are supported only on MacOSX:
# -C, --compile Compile generated .c file to .o file
# -C, --compile Compile generated .c file to .o file
# --link Link .o file to produce extension module (implies -C)
# --link Link .o file to produce extension module (implies -C)
...
@@ -98,8 +94,6 @@ def parse_command_line(args):
...
@@ -98,8 +94,6 @@ def parse_command_line(args):
options
.
working_path
=
pop_arg
()
options
.
working_path
=
pop_arg
()
elif
option
in
(
"-o"
,
"--output-file"
):
elif
option
in
(
"-o"
,
"--output-file"
):
options
.
output_file
=
pop_arg
()
options
.
output_file
=
pop_arg
()
elif
option
in
(
"-r"
,
"--recursive"
):
options
.
recursive
=
1
elif
option
in
(
"-t"
,
"--timestamps"
):
elif
option
in
(
"-t"
,
"--timestamps"
):
options
.
timestamps
=
1
options
.
timestamps
=
1
elif
option
in
(
"-f"
,
"--force"
):
elif
option
in
(
"-f"
,
"--force"
):
...
...
Cython/Compiler/Main.py
View file @
67c183d5
...
@@ -456,11 +456,8 @@ class CompilationOptions(object):
...
@@ -456,11 +456,8 @@ class CompilationOptions(object):
capi_reexport_cincludes
capi_reexport_cincludes
boolean Add cincluded headers to any auto-generated
boolean Add cincluded headers to any auto-generated
header files.
header files.
recursive boolean Recursively find and compile dependencies
timestamps boolean Only compile changed source files.
timestamps boolean Only compile changed source files. If None,
defaults to true when recursive is true.
verbose boolean Always print source names being compiled
verbose boolean Always print source names being compiled
quiet boolean Don't print source names in recursive mode
compiler_directives dict Overrides for pragma options (see Options.py)
compiler_directives dict Overrides for pragma options (see Options.py)
evaluate_tree_assertions boolean Test support: evaluate parse tree assertions
evaluate_tree_assertions boolean Test support: evaluate parse tree assertions
language_level integer The Python language level: 2 or 3
language_level integer The Python language level: 2 or 3
...
@@ -562,11 +559,8 @@ def compile_multiple(sources, options):
...
@@ -562,11 +559,8 @@ def compile_multiple(sources, options):
sources
=
[
os
.
path
.
abspath
(
source
)
for
source
in
sources
]
sources
=
[
os
.
path
.
abspath
(
source
)
for
source
in
sources
]
processed
=
set
()
processed
=
set
()
results
=
CompilationResultSet
()
results
=
CompilationResultSet
()
recursive
=
options
.
recursive
timestamps
=
options
.
timestamps
timestamps
=
options
.
timestamps
if
timestamps
is
None
:
verbose
=
options
.
verbose
timestamps
=
recursive
verbose
=
options
.
verbose
or
((
recursive
or
timestamps
)
and
not
options
.
quiet
)
context
=
None
context
=
None
for
source
in
sources
:
for
source
in
sources
:
if
source
not
in
processed
:
if
source
not
in
processed
:
...
@@ -582,14 +576,6 @@ def compile_multiple(sources, options):
...
@@ -582,14 +576,6 @@ def compile_multiple(sources, options):
# work properly yet.
# work properly yet.
context
=
None
context
=
None
processed
.
add
(
source
)
processed
.
add
(
source
)
if
recursive
:
for
module_name
in
context
.
find_cimported_module_names
(
source
):
path
=
context
.
find_pyx_file
(
module_name
,
[
source
])
if
path
:
sources
.
append
(
path
)
else
:
sys
.
stderr
.
write
(
"Cannot find .pyx file for cimported module '%s'
\
n
"
%
module_name
)
return
results
return
results
def
compile
(
source
,
options
=
None
,
full_module_name
=
None
,
**
kwds
):
def
compile
(
source
,
options
=
None
,
full_module_name
=
None
,
**
kwds
):
...
@@ -603,8 +589,7 @@ def compile(source, options = None, full_module_name = None, **kwds):
...
@@ -603,8 +589,7 @@ def compile(source, options = None, full_module_name = None, **kwds):
CompilationResultSet is returned.
CompilationResultSet is returned.
"""
"""
options
=
CompilationOptions
(
defaults
=
options
,
**
kwds
)
options
=
CompilationOptions
(
defaults
=
options
,
**
kwds
)
if
isinstance
(
source
,
basestring
)
and
not
options
.
timestamps
\
if
isinstance
(
source
,
basestring
)
and
not
options
.
timestamps
:
and
not
options
.
recursive
:
return
compile_single
(
source
,
options
,
full_module_name
)
return
compile_single
(
source
,
options
,
full_module_name
)
else
:
else
:
return
compile_multiple
(
source
,
options
)
return
compile_multiple
(
source
,
options
)
...
@@ -659,7 +644,6 @@ default_options = dict(
...
@@ -659,7 +644,6 @@ default_options = dict(
generate_pxi
=
0
,
generate_pxi
=
0
,
capi_reexport_cincludes
=
0
,
capi_reexport_cincludes
=
0
,
working_path
=
""
,
working_path
=
""
,
recursive
=
0
,
timestamps
=
None
,
timestamps
=
None
,
verbose
=
0
,
verbose
=
0
,
quiet
=
0
,
quiet
=
0
,
...
...
Cython/Compiler/ModuleNode.py
View file @
67c183d5
...
@@ -105,8 +105,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -105,8 +105,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env
.
return_type
=
PyrexTypes
.
c_void_type
env
.
return_type
=
PyrexTypes
.
c_void_type
self
.
referenced_modules
=
[]
self
.
referenced_modules
=
[]
self
.
find_referenced_modules
(
env
,
self
.
referenced_modules
,
{})
self
.
find_referenced_modules
(
env
,
self
.
referenced_modules
,
{})
if
options
.
recursive
:
self
.
generate_dep_file
(
env
,
result
)
self
.
sort_cdef_classes
(
env
)
self
.
sort_cdef_classes
(
env
)
self
.
generate_c_code
(
env
,
options
,
result
)
self
.
generate_c_code
(
env
,
options
,
result
)
self
.
generate_h_code
(
env
,
options
,
result
)
self
.
generate_h_code
(
env
,
options
,
result
)
...
@@ -119,20 +117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -119,20 +117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
return
1
return
1
return
0
return
0
def
generate_dep_file
(
self
,
env
,
result
):
modules
=
self
.
referenced_modules
if
len
(
modules
)
>
1
or
env
.
included_files
:
dep_file
=
replace_suffix
(
result
.
c_file
,
".dep"
)
f
=
open
(
dep_file
,
"w"
)
try
:
for
module
in
modules
:
if
module
is
not
env
:
f
.
write
(
"cimport %s
\
n
"
%
module
.
qualified_name
)
for
path
in
module
.
included_files
:
f
.
write
(
"include %s
\
n
"
%
path
)
finally
:
f
.
close
()
def
generate_h_code
(
self
,
env
,
options
,
result
):
def
generate_h_code
(
self
,
env
,
options
,
result
):
def
h_entries
(
entries
,
api
=
0
,
pxd
=
0
):
def
h_entries
(
entries
,
api
=
0
,
pxd
=
0
):
return
[
entry
for
entry
in
entries
return
[
entry
for
entry
in
entries
...
...
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