f2py on windows cant find gfortran because split_quoted() removed from ccompiler.py

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

f2py on windows cant find gfortran because split_quoted() removed from ccompiler.py

Jarrod Millman
Hey Pearu,

Sorry about messing up distutils; I have been warned that it can be hairy.

Anyway for those who haven't been following it, last November I
emailed the list a couple of times (obviously I should have checked
with Pearu and could have avoided this) asking if I could remove some
code from numpy/distutils/ccompiler.py.  Basically, we had our own
version of distutils.util.split_quoted() in
numpy/distutils/ccompiler.py, which made a minor change to distutils
default behavior (the fix keeps quotes when a quoted word doesn't
contain whitespace).  I created a ticket and ended up removing the
code:  http://scipy.org/scipy/numpy/ticket/619

Now it appears that this actually is breaking f2py on Windows:
http://scipy.org/scipy/numpy/ticket/723

Since my change may have broken something, I went ahead and reverted
it in r5054:
http://projects.scipy.org/scipy/numpy/changeset/5054

Hopefully, this will fix the problem with gfortran not being found and
won't introduce new problems.  Now we have come full circle and are
back where we were when I originally brought this issue to the list.

Our version of split_quoted()  was added several years ago and should
I think be submitted for inclusion upstream.  I know that distutils
isn't exactly being maintained, but--Pearu--is it possible that we
could get this upstream?

Thanks,

--
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: f2py on windows cant find gfortran because split_quoted() removed from ccompiler.py

Pearu Peterson-3

Jarrod Millman wrote:

> Our version of split_quoted()  was added several years ago and should
> I think be submitted for inclusion upstream.  I know that distutils
> isn't exactly being maintained, but--Pearu--is it possible that we
> could get this upstream?

I looked into the distutils code again and remembered the following
circumstances:

The split_quoted hack that we have in numpy.distutils, was the
"minimal fix" of the path name handling issue - it basically adds
only two extra lines to the function body and works well.

However, the split_quoted hack is not the "right fix".
The "right fix" would require more substantial changes to distutils
(note that distutils Windows support was developed on a unix
platform and it looks like many issues were fixed for specific
usage cases).

Since the "minimal fix" did its job (consider it as a workaround
to distutils misbehavior) and the "right fix" would require
much more work as well as lots of effort to prove upstream about
the importance of required changes
(consider the current distutils development status and
the fact that the numpy.distutils expands distutils in a direction
that upstream might not be interested in because the current
issue is irrelevant for std distutils tasks), I was satisfied
with the "minimal fix" (as at the time there were more important
issues to be resolved).

I suggest to leave this issue for practical reasons: the workaround
works and the correct fix is to painful to work out. Let practicality
beat purity in this case. I hope distutils will retire some day:)

Regards,
Pearu
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion