spe for Python 2.7? -> getting closure on a patch

Ryan Schmidt ryandesign at macports.org
Mon Mar 26 18:21:33 PDT 2012


On Mar 26, 2012, at 16:12, Dave Curtis wrote:

> I'd like to wrap up a committable patch for SPE for Python 2.7 before I forget what I was doing.
> 
> The issue as I see it is: What is the correct way to handle the architecture build flags?
> 
> It seems clear that 'supported_archs i386 ppc' should be set.
> 
> The ugly thing is what to do about the python call site in SPE -- I'm currently running with a patch that calls Python via 'arch -i386'.  The good news is that my build seems to be functionally rock solid, I've been using it heavily for a few days.  The bad news is that it generates outrageous amounts of chatter on stderr -- I'm not sure where all the warnings are coming from, but I suspect they have their roots in wx.  I don't have the time to chase them down, and I don't have the background with wx to be very effective at it.  Since SPE seems to have excellent stability despite the console noise, I'd like to leave it as-is.
> 
> Unfortunately, my 'invoke Python via arch i386' patch will break on PPC.  Ryan suggests below that one way to fix this is to turn off the universal variant.  That seems to me to be the best solution -- are there large numbers of people that will care about having an i386/ppc universal build of SPE?  I'm guessing not.
> 
> If that is what we want, then I have two questions:
> 1. How do I make a patch conditional on the build variant?

Instead of writing "arch -i386" into the patchfile, write "arch - at ARCH@" into the patchfile. Then add this to the Portfile:

post-patch {
    reinplace "s|@ARCH@|${build_arch}|g" ${worksrcpath}/path/to/the/file
}

> 2. How do I turn off universal?

universal_variant no



More information about the macports-users mailing list