Show More
@@ -147,6 +147,10 b' class CythonMagics(Magics):' | |||
|
147 | 147 | "multiple times)." |
|
148 | 148 | ) |
|
149 | 149 | @magic_arguments.argument( |
|
150 | '-n', '--module_name', action='append', default=[], | |
|
151 | help="Specify a name for the Cython module." | |
|
152 | ) | |
|
153 | @magic_arguments.argument( | |
|
150 | 154 | '-L', dest='library_dirs', metavar='dir', action='append', default=[], |
|
151 | 155 | help="Add a path to the list of libary directories (can be specified " |
|
152 | 156 | "multiple times)." |
@@ -204,7 +208,10 b' class CythonMagics(Magics):' | |||
|
204 | 208 | # key which is hashed to determine the module name. |
|
205 | 209 | key += time.time(), |
|
206 | 210 | |
|
207 | module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() | |
|
211 | if args.module_name: | |
|
212 | module_name = str(args.module_name[0]) | |
|
213 | else: | |
|
214 | module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() | |
|
208 | 215 | module_path = os.path.join(lib_dir, module_name + self.so_ext) |
|
209 | 216 | |
|
210 | 217 | have_module = os.path.isfile(module_path) |
General Comments 0
You need to be logged in to leave comments.
Login now