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
Kirill Smelkov
cython
Commits
5c6d28fd
Commit
5c6d28fd
authored
Nov 22, 2008
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add custom distutils build_ext command ignoring C compiler failues when building Cython
parent
a5f4943e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
setup.py
setup.py
+8
-0
No files found.
setup.py
View file @
5c6d28fd
...
...
@@ -29,6 +29,13 @@ try:
sys
.
argv
.
remove
(
"--no-cython-compile"
)
except
ValueError
:
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
source_root
=
os
.
path
.
dirname
(
__file__
)
compiled_modules
=
[
"Cython.Plex.Scanners"
,
...
...
@@ -48,6 +55,7 @@ except ValueError:
print
(
"Compilation failed"
)
if
extensions
:
setup_args
[
'ext_modules'
]
=
extensions
setup_args
[
'cmdclass'
]
=
{
"build_ext"
:
build_ext
}
except
Exception
:
print
(
"ERROR: %s"
%
sys
.
exc_info
()[
1
])
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