[PyKDE] How to apply patches to qt.py ?

Gerard Vermeulen gvermeul at grenoble.cnrs.fr
Mon Oct 7 08:59:01 BST 2002


Marc,

Patching between the build.py and running make is simplest (especially
if you make an rpm package).

Gerard

PS: of course you know: build.py make sip generate the code in
the qt subdirectory. 

On Sun, Oct 06, 2002 at 08:48:47PM +0200, Marc Schmitt wrote:
> 
> The following "solution" should work, at least until the problem will be 
> solved in general.
> Up to Adrian, it's an issue with the fast malloc used in SuSE qt version, 
> which was applied 
> to increase speed by about 10%. 
> 
> > the problem is that python is loaded first and qt is opened later via
> > dlopen. Our qt has the fast malloc implementation which improves the speed
> > for threaded apps a lot (and will be the default malloc in glibc 2.3).
> > But the problem here is that malloc routine is exchanged later what
> > caused the crash.
> 
> My workaround now would be to patch the file /%{python_site}/qt.py with the 
> following code,
> which should prevent Qt from using fast-malloc.
> 
>   # You should have received a copy of the GNU General Public License along 
> with
>   # PyQt; see the file LICENSE.  If not, write to the Free Software 
> Foundation,
>   # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
> 
> +
> + # hotfix for "fast malloc", not using this can cause crashes on some systems
> + from os import environ
> + environ["KDE_MALLOC"]="0"
> + del environ
> +
> +
>   # Support for signals.
> 
>   def SLOT(slot):
>         return '1' + slot
> 
> 
> 
> Where is the best/most elegant point to apply this ? I looked over the 
> build.py script, but found no appropriate place.
> 
> Thanks
> -Marc
> 
> 
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde




More information about the PyQt mailing list