hm true, but we call Python sub instances multiple times and I have no idea how to cache it for the parent processes. Caching in a file would make it more complicated, because everyone still has the possibility to switch back to mingw.org, and also would not be that much faster.
Greetings Patrick 2011/1/14 Wolfgang Rohdewald <[email protected]> > caching getGCCTarget() really makes some operations > > much faster. And emerge prints much less debug > > messages. > > I suppose it must be called again as long > > as Popen fails - but when it succeeded, can > > gcc change its opinion later on? > > def getGCCTarget(): > > # TODO: Cache this! > > try: > > result = subprocess.Popen("gcc -dumpmachine", > stdout=subprocess.PIPE).communicate()[0] > > utils.debug("GCC Target Processor:%s" % result, 1 ) > > return result.strip() > > except OSError: > > #if no mingw is installed return mingw-w32 it is part of base > > return "i686-w64-mingw32" > > -- > > Wolfgang > > _______________________________________________ > Kde-windows mailing list > [email protected] > https://mail.kde.org/mailman/listinfo/kde-windows > >
_______________________________________________ Kde-windows mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-windows
