Python script to install python
Daniel Fetchinson
fetchinson at googlemail.com
Thu Jul 8 11:11:59 EDT 2010
> I would like to have a python script that would download the most
> recent svn of python, configure, make, install and cleanup after
> itself. I am not replacing the python version I would be using to run
> the script.
> I was struggling to get this to work and I assume someone else has
> done it better. Any pointers?
Assuming you are on linux I recommend not using a python script for
this but rather a shell script. From a python script you would most of
the time be calling shell commands anyway. In a shell script you would
do something like this:
################################
#!/bin/bash
svn checkout ........................
cd whatever
./configure --whatever-options-you-like
make
# you probably want to run this as root
make install
# you probably don't want to be root anymore
cd ..
rm -rf whatever
################################
If you are on windows I assume a similar strategy is best.
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
More information about the Python-list
mailing list