On Thu, May 7, 2009 at 11:10 AM, Robert <[email protected]> wrote:
> On Windows in distutils/distutils.cfg MingW is set instead of VC
> default
>
> [build]
> compiler = mingw32
>
>
> works well with extensions, including setup.py-method for building
> Cython modules. But it fails with pyximport method.
> Is this a bug - or how to tell using the MingW compiler?
>

I would not say it is a bug, but rather a consequence of the
implementation of pyximport.

Likely a call to  "dist.parse_config_files()" should be added just
before "dist.parse_command_line()" in pyximport/pyxbuild.py

However, if you do this, a "setup.cfg" file will be parse if present
in $PWD... This could be seen as a gotcha, or as a feature...




> Robert
>
>
>  >>> import pyximport
>  >>> pyximport.install()
>  >>> import cyex
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in <module>
>   File "C:\Python26\lib\site-packages\pyximport\pyximport.py",
> line 288, in load_module
>     self.pyxbuild_dir)
>   File "C:\Python26\lib\site-packages\pyximport\pyximport.py",
> line 154, in load_module
>     raise ImportError("Building module failed: %s" % e)
> ImportError: Building module failed:
> DistutilsPlatformError('Unable to find vcvarsall.bat',)
>
>
> -
>
>   File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
>     self.run_command(cmd)
>   File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
>     cmd_obj.run()
>   File "C:\Python26\lib\distutils\command\build_ext.py", line
> 345, in run
>     self.build_extensions()
>   File
> "C:\Python26\lib\site-packages\Cython\Distutils\build_ext.py",
> line 83, in build_extensions
>     self.build_extension(ext)
>   File "C:\Python26\lib\distutils\command\build_ext.py", line
> 536, in build_extension
>     depends=ext.depends)
>   File "C:\Python26\lib\distutils\msvc9compiler.py", line 448, in
> compile
>     self.initialize()
>   File "C:\Python26\lib\distutils\msvc9compiler.py", line 358, in
> initialize
>     vc_env = query_vcvarsall(VERSION, plat_spec)
>   File "C:\Python26\lib\distutils\msvc9compiler.py", line 250, in
> query_vcvarsall
>     raise DistutilsPlatformError("Unable to find vcvarsall.bat")
> DistutilsPlatformError: Unable to find vcvarsall.bat
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to