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.<systemafter compiling Python to see what
modules have been built.
Regards,
Martin