[SciPy-Dev] Getting Scipy's weave to work reliably on Windows
Tue Aug 24 19:35:56 CDT 2010
Have you tried patching python's distutils with the patch at (
http://bugs.python.org/issue4508)? If so, does the patch fix both cases of
spaces in the path? It appears to me that one of the compiler files in the
python source is not correctly quoting of spaces in intermediate files.
On 18 July 2010 03:49, Chris Ball <firstname.lastname@example.org> wrote:
> While testing Scipy's weave on several different Windows installations, I
> across some problems with spaces in paths that often prevent weave from
> I can see a change that could probably get weave working on most Windows
> installations, but it is a quick hack. Someone knowledgeable about
> (and numpy.distutils?) might be able to help me fix this properly. Below I
> describe three common problems with weave on Windows, in the hope that this
> information helps others, or allows someone to suggest how to fix the
> paths problem properly.
> I think there are three common problems that stop weave from working on
> The first is not having a C compiler. Both Python(x,y) and EPD provide a C
> compiler that seems to work fine, which is great!
> The second problem is that if weave is installed to a location with a space
> the path, linking fails. There is already a scipy bug report about this
> (http://projects.scipy.org/scipy/ticket/809). I've just commented on that
> report, saying the problem appears to be with distutils, and there is
> already a
> Python bug report about it (http://bugs.python.org/issue4508). Maybe
> could close this scipy bug, or link it to the Python one somehow? In any
> when using Python(x,y) or EPD, this bug will not show up if the default
> installation locations are accepted. So, that's also good news!
> The third problem is that if the Windows user name has a space in it (which
> my experience is quite common), compilation fails. Weave uses the user name
> create a path for its "intermediate" and "compiled" files. When the
> command is issued, the path with the space in it is also not quoted.
> that is another error in distutils (or numpy.distutils)? Unfortunately I
> able to pinpoint what function is failing to quote strings properly,
> because I
> couldn't figure out the chain that leads to the compiler being called.
> I can avoid the problem by removing spaces from the user name in weave
> def whoami():
> """return a string identifying the user."""
> return (os.environ.get("USER") or os.environ.get("USERNAME") or
> "unknown").replace(" ","")
> (where I have added .replace(" ","") to the existing code).
> I realize this isn't the right solution, so if someone could help to guide
> me to
> the point where quoting should occur, that would be very helpful.
> Otherwise, is
> there any chance of applying a hack like this so weave can work reliably on
> SciPy-Dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev