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
770222a3
Commit
770222a3
authored
Dec 23, 2008
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix distutils GCC compilation flags to remove -Wstrict-prototypes for the C++ case
parent
e7d1eb15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
runtests.py
runtests.py
+11
-2
No files found.
runtests.py
View file @
770222a3
...
@@ -6,7 +6,7 @@ WITH_CYTHON = True
...
@@ -6,7 +6,7 @@ WITH_CYTHON = True
from
distutils.dist
import
Distribution
from
distutils.dist
import
Distribution
from
distutils.core
import
Extension
from
distutils.core
import
Extension
from
distutils.command.build_ext
import
build_ext
from
distutils.command.build_ext
import
build_ext
as
_build_ext
distutils_distro
=
Distribution
()
distutils_distro
=
Distribution
()
TEST_DIRS
=
[
'compile'
,
'errors'
,
'run'
,
'pyregr'
]
TEST_DIRS
=
[
'compile'
,
'errors'
,
'run'
,
'pyregr'
]
...
@@ -26,6 +26,14 @@ VER_DEP_MODULES = {
...
@@ -26,6 +26,14 @@ VER_DEP_MODULES = {
INCLUDE_DIRS
=
[
d
for
d
in
os
.
getenv
(
'INCLUDE'
,
''
).
split
(
os
.
pathsep
)
if
d
]
INCLUDE_DIRS
=
[
d
for
d
in
os
.
getenv
(
'INCLUDE'
,
''
).
split
(
os
.
pathsep
)
if
d
]
CFLAGS
=
os
.
getenv
(
'CFLAGS'
,
''
).
split
()
CFLAGS
=
os
.
getenv
(
'CFLAGS'
,
''
).
split
()
class
build_ext
(
_build_ext
):
def
build_extension
(
self
,
ext
):
if
ext
.
language
==
'c++'
:
try
:
self
.
compiler
.
compiler_so
.
remove
(
'-Wstrict-prototypes'
)
except
Exception
:
pass
_build_ext
.
build_extension
(
self
,
ext
)
class
ErrorWriter
(
object
):
class
ErrorWriter
(
object
):
match_error
=
re
.
compile
(
'(warning:)?(?:.*:)?
\
s*([-
0
-9]+)
\
s*:
\
s*([-0-9]+)
\
s*:
\
s*(.*)'
).
match
match_error
=
re
.
compile
(
'(warning:)?(?:.*:)?
\
s*([-
0
-9]+)
\
s*:
\
s*([-0-9]+)
\
s*:
\
s*(.*)'
).
match
...
@@ -259,12 +267,13 @@ class CythonCompileTestCase(unittest.TestCase):
...
@@ -259,12 +267,13 @@ class CythonCompileTestCase(unittest.TestCase):
if
incdir
:
if
incdir
:
build_extension
.
include_dirs
.
append
(
incdir
)
build_extension
.
include_dirs
.
append
(
incdir
)
build_extension
.
finalize_options
()
build_extension
.
finalize_options
()
extension
=
Extension
(
extension
=
Extension
(
module
,
module
,
sources
=
[
self
.
build_target_filename
(
module
)],
sources
=
[
self
.
build_target_filename
(
module
)],
extra_compile_args
=
CFLAGS
,
extra_compile_args
=
CFLAGS
,
)
)
if
self
.
language
==
'cpp'
:
extension
.
language
=
'c++'
build_extension
.
extensions
=
[
extension
]
build_extension
.
extensions
=
[
extension
]
build_extension
.
build_temp
=
workdir
build_extension
.
build_temp
=
workdir
build_extension
.
build_lib
=
workdir
build_extension
.
build_lib
=
workdir
...
...
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