Recompiling Python with threads enabled

Joseph Ryan joseph_ryan at bmc.com
Mon Jun 5 15:51:40 EDT 2000


I would suggest that you get the source for the last stable release (start
at www.python.org). This would be 1.5.2.

(I am using 1.6alpha2 without incident).  The compilation with threads is
provoked during the configure step by specifying --with-threads (this is
*not*) the default. For example:

CC=gcc; ./configure --with-threads

( need the CC=gcc to override using the default compiler on my UNIXes; on
Linux this is less likely to be needed). There are many other options for
configure. I would suggest

./configure -help

to get started and check out the README file of course.

I also build 1.5.2 from source on UNIX but I now recall that I switched to
the 1.6 version in part because it promised better support for threads. :-)
You may want to research more in this subject especially if you plan to use
extensions (exp Tkinter) for which threads are less reliable/useful.

Good luck!

"Martin Skøtt" <mskott at image.dk> wrote in message
news:n1l03rcl.fsf at jumbo.skott.dk...
> Hi
>
> Sorry if you don't think this belongs in a Python group, but I think
> its more relevant here than in a Linux group. Sorry for the
> inconvenience :-)
>
> And now on to the question:
> I wish to recompile Python 1.5.1 on my Red Hat 5.2 system to enable
> the threads module, but how do I do? Do I need to install the src RPM
> and which files should I change to enable threads??
>
> I hope anyone will help me
> --
> Martin Skøtt
> mskott at image.dk
>
> 'In a certain sense, all decent programming languages are equally
powerfull'
> Dr. Alan Turing





More information about the Python-list mailing list