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
e8f3c9e5
Commit
e8f3c9e5
authored
Nov 23, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
7b6eff65
5c6d28fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-1
setup.py
setup.py
+8
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
e8f3c9e5
...
@@ -545,11 +545,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -545,11 +545,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#endif"
)
code
.
putln
(
"#endif"
)
def
generate_includes
(
self
,
env
,
cimported_modules
,
code
):
def
generate_includes
(
self
,
env
,
cimported_modules
,
code
):
includes
=
env
.
include_files
[:
]
includes
=
[
]
for
module
in
cimported_modules
:
for
module
in
cimported_modules
:
for
filename
in
module
.
include_files
:
for
filename
in
module
.
include_files
:
if
filename
not
in
includes
:
if
filename
not
in
includes
:
includes
.
append
(
filename
)
includes
.
append
(
filename
)
for
filename
in
env
.
include_files
:
if
filename
not
in
includes
:
includes
.
append
(
filename
)
for
filename
in
includes
:
for
filename
in
includes
:
code
.
putln
(
'#include "%s"'
%
filename
)
code
.
putln
(
'#include "%s"'
%
filename
)
...
...
setup.py
View file @
e8f3c9e5
...
@@ -29,6 +29,13 @@ try:
...
@@ -29,6 +29,13 @@ try:
sys
.
argv
.
remove
(
"--no-cython-compile"
)
sys
.
argv
.
remove
(
"--no-cython-compile"
)
except
ValueError
:
except
ValueError
:
try
:
try
:
from
distutils.command.build_ext
import
build_ext
as
build_ext_orig
class
build_ext
(
build_ext_orig
):
def
build_extension
(
self
,
ext
,
*
args
,
**
kargs
):
try
:
build_ext_orig
.
build_extension
(
self
,
ext
,
*
args
,
**
kargs
)
except
StandardError
:
print
(
"Compilation of '%s' failed"
%
ext
.
sources
[
0
])
from
Cython.Compiler.Main
import
compile
from
Cython.Compiler.Main
import
compile
source_root
=
os
.
path
.
dirname
(
__file__
)
source_root
=
os
.
path
.
dirname
(
__file__
)
compiled_modules
=
[
"Cython.Plex.Scanners"
,
compiled_modules
=
[
"Cython.Plex.Scanners"
,
...
@@ -48,6 +55,7 @@ except ValueError:
...
@@ -48,6 +55,7 @@ except ValueError:
print
(
"Compilation failed"
)
print
(
"Compilation failed"
)
if
extensions
:
if
extensions
:
setup_args
[
'ext_modules'
]
=
extensions
setup_args
[
'ext_modules'
]
=
extensions
setup_args
[
'cmdclass'
]
=
{
"build_ext"
:
build_ext
}
except
Exception
:
except
Exception
:
print
(
"ERROR: %s"
%
sys
.
exc_info
()[
1
])
print
(
"ERROR: %s"
%
sys
.
exc_info
()[
1
])
print
(
"Extension module compilation failed, using plain Python implementation"
)
print
(
"Extension module compilation failed, using plain Python implementation"
)
...
...
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