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
9361decf
Commit
9361decf
authored
Jan 17, 2017
by
Robert Bradshaw
Committed by
GitHub
Jan 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1579 from karlkempe/master
Add --src flag to add c/c++ src files (cythonmagic)
parents
d02cc4c5
57cc7cd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Cython/Build/IpythonMagic.py
Cython/Build/IpythonMagic.py
+7
-1
No files found.
Cython/Build/IpythonMagic.py
View file @
9361decf
...
...
@@ -188,6 +188,11 @@ class CythonMagics(Magics):
help
=
"Add a path to the list of include directories (can be specified "
"multiple times)."
)
@
magic_arguments
.
argument
(
'-S'
,
'--src'
,
action
=
'append'
,
default
=
[],
help
=
"Add a path to the list of src files (can be specified "
"multiple times)."
)
@
magic_arguments
.
argument
(
'-+'
,
'--cplus'
,
action
=
'store_true'
,
default
=
False
,
help
=
"Output a C++ rather than C file."
...
...
@@ -252,6 +257,7 @@ class CythonMagics(Magics):
if
need_cythonize
:
c_include_dirs
=
args
.
include
c_src_files
=
map
(
str
,
args
.
src
)
if
'numpy'
in
code
:
import
numpy
c_include_dirs
.
append
(
numpy
.
get_include
())
...
...
@@ -261,7 +267,7 @@ class CythonMagics(Magics):
f
.
write
(
code
)
extension
=
Extension
(
name
=
module_name
,
sources
=
[
pyx_file
],
sources
=
[
pyx_file
]
+
c_src_files
,
include_dirs
=
c_include_dirs
,
library_dirs
=
args
.
library_dirs
,
extra_compile_args
=
args
.
compile_args
,
...
...
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