[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

[2.4.2] Compiling Python with packages?

unknown

2/3/2008 6:35:00 AM

Hello

I need to compile Python with the packages "socket,sys,time,os", but
I've never done it before, and would like confirmation that this will
work as planned:

======
make clean
../configure --with-socket --with-sys --with-time --with-os
make
make install
======

In addition, are there recommended switches I should know about?

Incidently, is there an equivalent to PHP's phpinfo() to check what
packages Python provides on a host?

Thank you.
2 Answers

Martin v. Loewis

2/3/2008 8:14:00 AM

0

> I need to compile Python with the packages "socket,sys,time,os", but
> I've never done it before, and would like confirmation that this will
> work as planned:
>
> ======
> make clean
> ./configure --with-socket --with-sys --with-time --with-os
> make
> make install
> ======

No, it won't. You don't give any arguments to configure normally,
when building Python. Instead, setup.py will detect what libraries
are on your system, and use them.

There are a few --enable and --with flags supported; ask --help
what they are.

The modules you want to have (socket, sys, time, and os) are always
built.

> In addition, are there recommended switches I should know about?
>
> Incidently, is there an equivalent to PHP's phpinfo() to check what
> packages Python provides on a host?

There is sys.builtin_module_names. However, some modules are
not builtin (they are shared libraries instead); it's easiest
to ls build/lib.<system> after compiling Python to see what
modules have been built.

Regards,
Martin

unknown

2/4/2008 2:56:00 AM

0

On Sun, 03 Feb 2008 09:14:24 +0100, "Martin v. Löwis"
<martin@v.loewis.de> wrote:
>No, it won't. You don't give any arguments to configure normally,
>when building Python. Instead, setup.py will detect what libraries
>are on your system, and use them.

Thanks for the tip.