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
48a8fa37
Commit
48a8fa37
authored
Oct 12, 2012
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #142 from mongi3/master
Added "--capi-reexport-cincludes" option
parents
ab4e40c1
959c98dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+3
-0
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+4
-0
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-0
No files found.
Cython/Compiler/CmdLine.py
View file @
48a8fa37
...
...
@@ -36,6 +36,7 @@ Options:
--embed[=<method_name>] Generate a main() function that embeds the Python interpreter.
-2 Compile based on Python-2 syntax and code semantics.
-3 Compile based on Python-3 syntax and code semantics.
--capi-reexport-cincludes Add cincluded headers to any auto-generated header files.
--fast-fail Abort the compilation on the first error
--warning-errors, -Werror Make all warnings into errors
--warning-extra, -Wextra Enable extra warnings
...
...
@@ -128,6 +129,8 @@ def parse_command_line(args):
options
.
language_level
=
2
elif
option
==
'-3'
:
options
.
language_level
=
3
elif
option
==
"--capi-reexport-cincludes"
:
options
.
capi_reexport_cincludes
=
True
elif
option
==
"--fast-fail"
:
Options
.
fast_fail
=
True
elif
option
in
(
'-Werror'
,
'--warning-errors'
):
...
...
Cython/Compiler/Main.py
View file @
48a8fa37
...
...
@@ -453,6 +453,9 @@ class CompilationOptions(object):
include_path [string] Directories to search for include files
output_file string Name of generated .c file
generate_pxi boolean Generate .pxi file for public declarations
capi_reexport_cincludes
boolean Add cincluded headers to any auto-generated
header files.
recursive boolean Recursively find and compile dependencies
timestamps boolean Only compile changed source files. If None,
defaults to true when recursive is true.
...
...
@@ -654,6 +657,7 @@ default_options = dict(
output_file
=
None
,
annotate
=
None
,
generate_pxi
=
0
,
capi_reexport_cincludes
=
0
,
working_path
=
""
,
recursive
=
0
,
timestamps
=
None
,
...
...
Cython/Compiler/ModuleNode.py
View file @
48a8fa37
...
...
@@ -152,6 +152,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
h_code
.
put_h_guard
(
h_guard
)
h_code
.
putln
(
""
)
self
.
generate_type_header_code
(
h_types
,
h_code
)
if
options
.
capi_reexport_cincludes
:
self
.
generate_includes
(
env
,
[],
h_code
)
h_code
.
putln
(
""
)
api_guard
=
Naming
.
api_guard_prefix
+
self
.
api_name
(
env
)
h_code
.
putln
(
"#ifndef %s"
%
api_guard
)
...
...
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