Show More
@@ -128,6 +128,10 b' class CythonMagics(Magics):' | |||||
128 | "multiple times)." |
|
128 | "multiple times)." | |
129 | ) |
|
129 | ) | |
130 | @magic_arguments.argument( |
|
130 | @magic_arguments.argument( | |
|
131 | '-+', '--cplus', action='store_true', default=False, | |||
|
132 | help="Output a C++ rather than C file." | |||
|
133 | ) | |||
|
134 | @magic_arguments.argument( | |||
131 | '-f', '--force', action='store_true', default=False, |
|
135 | '-f', '--force', action='store_true', default=False, | |
132 | help="Force the compilation of the pyx module even if it hasn't " |
|
136 | help="Force the compilation of the pyx module even if it hasn't " | |
133 | "changed" |
|
137 | "changed" | |
@@ -182,11 +186,16 b' class CythonMagics(Magics):' | |||||
182 | extra_compile_args = args.compile_args, |
|
186 | extra_compile_args = args.compile_args, | |
183 | extra_link_args = args.link_args, |
|
187 | extra_link_args = args.link_args, | |
184 | libraries = args.lib, |
|
188 | libraries = args.lib, | |
|
189 | language = 'c++' if args.cplus else 'c', | |||
185 | ) |
|
190 | ) | |
186 | build_extension = self._get_build_extension() |
|
191 | build_extension = self._get_build_extension() | |
187 | try: |
|
192 | try: | |
188 | build_extension.extensions = cythonize([extension], quiet=quiet, |
|
193 | opts = dict( | |
189 | annotate=args.annotate, force=args.force) |
|
194 | quiet=quiet, | |
|
195 | annotate = args.annotate, | |||
|
196 | force = args.force, | |||
|
197 | ) | |||
|
198 | build_extension.extensions = cythonize([extension], **opts) | |||
190 | except CompileError: |
|
199 | except CompileError: | |
191 | return |
|
200 | return | |
192 | build_extension.build_temp = os.path.dirname(pyx_file) |
|
201 | build_extension.build_temp = os.path.dirname(pyx_file) |
General Comments 0
You need to be logged in to leave comments.
Login now