From: Doug M. <mc...@ia...> - 2007-02-05 15:00:24
|
On Feb 5, 2007, at 8:43 AM, Patrick Hartling wrote: > Doug McCorkle wrote: >> >> On Feb 4, 2007, at 12:43 PM, Doug McCorkle wrote: >> >>> >>> On Feb 4, 2007, at 8:02 AM, Patrick Hartling wrote: >>> >>>> Doug McCorkle wrote: >>>>> On Jan 3, 2007, at 7:32 PM, Daniel E. Shipton wrote: >>>>> >>>>>> This may be that scons doesn't handle the escape characters that >>>>>> are in the gmtl.pc file. Those extra escape character probably >>>>>> don't need to be there but maybe there was a reason...? >>>>>> >>>>>> -Dan >>>>>> >>>>> >>>>> [snip] >>>>> >>>>> Was there a resolution to the need for the escape characters in >>>>> the >>>>> pc file? It would be nice if they could be removed. >>>> >>>> It certainly would be nice. I had always assumed that the SCons >>>> function >>>> PkgConfigBuilder() was injecting them, but I never tried tracking >>>> down their >>>> exact source. >>>> >>>> >>> >>> I will take a look and see if I can create a patch. >> >> How about this patch? > > That's very interesting. I can see why re.escape() is being used in > that > context, but I wonder if it's truly necessary. There is no > indication in the > revision history or in the code of a specific reason that re.escape > () needs > to be used. It definitely is not needed for key given the > restrictions on > what key can be. For Windows, I can see where it would be important to > ensure that the backslash characters in a path would be handled > properly, > but that's the only case I can think of. That can be handled more > directly > using str.replace(). > Your comment about Windows makes sense. Please let me know if the patch or a similar fix is committed. Thanks. Doug |