[SciPy-dev] Re: scipy_distutils under cygwin using DF

Pearu Peterson pearu at scipy.org
Tue Mar 30 12:01:08 EST 2004



On Tue, 30 Mar 2004, [ISO-8859-15] Berthold Höllmann wrote:

> There are still problems (a problem) with the patches. I was already
> im mine, but I had'nt found the time to report them, sorry. The
> version is working for Linux and Solaris but trying to build
> scipy_core under WinXP I get:
> 
> ---snip---
> ...
> compling C sources
> creating build\temp.win32-2.3
> creating build\temp.win32-2.3\Release
> creating build\temp.win32-2.3\Release\scipy_base
> C:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -DUSE_MCONF_LITE_LE -Ic:\Python23\include -Ic:\Python23\PC /Tcscipy_base\fastumathmodule.c /Fobuild\temp.win32-2.3\Release\scipy_base\fastumathmodule.obj
> Could not locate executable h:\work\CVS\scipy\scipy_core\"C:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe"
> Executable h:\work\CVS\scipy\scipy_core\"C:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe" does not exist
> 
> error: Command ""C:\Programme\Microsoft Visual Studio\VC98\BIN\cl.exe" /c /nologo /Ox /MD /W3 /GX /DNDEBUG -DUSE_MCONF_LITE_LE -Ic:\Python23\include -Ic:\Python23\PC /Tcscipy_base\fastumathmodule.c /Fobuild\temp.win32-2.3\Release\scipy_base\fastumathmodule.obj" failed with exit status 1
> ---snip---
> 
> "h:\work\CVS\scipy\scipy_core\" is where I checked out scipy from
> CVS. Further "python scipy_distutils/exec_command.py" fails. Line
> numbers are not exactely those from CVS because of additional
> debugging code.

It seems that os.path.realpath is messing up things. For example,

In [4]: os.path.realpath('c:/adad/adsa')
Out[4]: '/home/pearu/c:/adad/adsa'

In [5]: os.path.realpath('/adad/adsa')
Out[5]: '/adad/adsa'

Could you test on WinXP what is the result of the following expression

  os.path.realpath(r'C:\Programme')

when python was fired up from the H: disk?

Hmm, Python docs say that  os.path.realpath is available only for Unix. 
This could provide a fix.

> ---snip---
>     s,o=exec_command('echo path=%path%')
>     log.debug((s,o))
>     assert s==0 and o!='',(s,o)
> 
>     s,o=exec_command('%s -c "import sys;sys.stderr.write(sys.platform)"' \
>                      % pythonexe)
>     log.debug((s,o))
>     assert s==0 and o=='win32',(s,o)
> ---snip---
> 
> With this I get:
> 
> ---snip---
> $ python scipy_distutils/exec_command.py
> ...
> AssertionError: (0, 'COMMAND \'c:\\\\Python23\\\\PYTHON.EXE -c "import sys;sys.stderr.write(sys.platform)"\' FAILED: win32')
> ---snip---
> 
> The problem is, the test writes to stderr, but a result on stderr
> leads "_exec_command" to generate the "... FAILED ..."

I think I have fixed that yesterday.


> AssertionError: (0, '$AAA')
> ---snip---
> 
> which I also don't understand

Ok, I could reproduce this on Sun and this is now fixed in CVS.

Thanks,
Pearu




More information about the SciPy-Dev mailing list