From fe29df9b9f0fe8b6be0e405d0d57b0805f56fd35 2012-05-31 14:11:54 From: David Hirschfeld Date: 2012-05-31 14:11:54 Subject: [PATCH] Fixed a vcvarsall.bat error on win32/Py2.7 when trying to compile with mingw. --- diff --git a/IPython/extensions/cythonmagic.py b/IPython/extensions/cythonmagic.py index a9c0432..a3bc47b 100644 --- a/IPython/extensions/cythonmagic.py +++ b/IPython/extensions/cythonmagic.py @@ -156,7 +156,14 @@ class CythonMagics(Magics): include_dirs = c_include_dirs, extra_compile_args = cflags ) - build_extension = build_ext(Distribution()) + dist = Distribution() + config_files = dist.find_config_files() + try: + config_files.remove('setup.cfg') + except ValueError: + pass + dist.parse_config_files(config_files) + build_extension = build_ext(dist) build_extension.finalize_options() try: build_extension.extensions = cythonize([extension], ctx=ctx, quiet=quiet)