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
53b6f435
Commit
53b6f435
authored
Jun 04, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move misplaced function out of the way to keep the related code about distutils options together.
parent
7fd33564
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+21
-21
No files found.
Cython/Build/Dependencies.py
View file @
53b6f435
...
...
@@ -127,6 +127,27 @@ def file_hash(filename):
return
m
.
hexdigest
()
def
update_pythran_extension
(
ext
):
if
not
PythranAvailable
:
raise
RuntimeError
(
"You first need to install Pythran to use the np_pythran directive."
)
pythran_ext
=
pythran
.
config
.
make_extension
()
ext
.
include_dirs
.
extend
(
pythran_ext
[
'include_dirs'
])
ext
.
extra_compile_args
.
extend
(
pythran_ext
[
'extra_compile_args'
])
ext
.
extra_link_args
.
extend
(
pythran_ext
[
'extra_link_args'
])
ext
.
define_macros
.
extend
(
pythran_ext
[
'define_macros'
])
ext
.
undef_macros
.
extend
(
pythran_ext
[
'undef_macros'
])
ext
.
library_dirs
.
extend
(
pythran_ext
[
'library_dirs'
])
ext
.
libraries
.
extend
(
pythran_ext
[
'libraries'
])
ext
.
language
=
'c++'
# These options are not compatible with the way normal Cython extensions work
for
bad_option
in
[
"-fwhole-program"
,
"-fvisibility=hidden"
]:
try
:
ext
.
extra_compile_args
.
remove
(
bad_option
)
except
ValueError
:
pass
def
parse_list
(
s
):
"""
>>> parse_list("")
...
...
@@ -180,27 +201,6 @@ distutils_settings = {
}
def
update_pythran_extension
(
ext
):
if
not
PythranAvailable
:
raise
RuntimeError
(
"You first need to install Pythran to use the np_pythran directive."
)
pythran_ext
=
pythran
.
config
.
make_extension
()
ext
.
include_dirs
.
extend
(
pythran_ext
[
'include_dirs'
])
ext
.
extra_compile_args
.
extend
(
pythran_ext
[
'extra_compile_args'
])
ext
.
extra_link_args
.
extend
(
pythran_ext
[
'extra_link_args'
])
ext
.
define_macros
.
extend
(
pythran_ext
[
'define_macros'
])
ext
.
undef_macros
.
extend
(
pythran_ext
[
'undef_macros'
])
ext
.
library_dirs
.
extend
(
pythran_ext
[
'library_dirs'
])
ext
.
libraries
.
extend
(
pythran_ext
[
'libraries'
])
ext
.
language
=
'c++'
# These options are not compatible with the way normal Cython extensions work
for
bad_option
in
[
"-fwhole-program"
,
"-fvisibility=hidden"
]:
try
:
ext
.
extra_compile_args
.
remove
(
bad_option
)
except
ValueError
:
pass
@
cython
.
locals
(
start
=
cython
.
Py_ssize_t
,
end
=
cython
.
Py_ssize_t
)
def
line_iter
(
source
):
if
isinstance
(
source
,
basestring
):
...
...
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