TPJ said unto the world upon 21/06/2005 02:00:
> First I have to admit that my English isn't good enough. I'm still
> studying and sometimes I just can't express what I want to express.


I've graded essays in Philosophy at my university that were written by 
native speakers of English yet were substantially less clear and well 
written than your post. I don't think you will need to lead with an 
apology for your language skills in the future :-)


> A few weeks ago I've written 'Python Builder' - a bash script that
> allows anyone to download, compile (with flags given by user) and
> install Python and some external modules (e.g. wxPython, PyGTK,

<snip>

> kind. My need is very special - I want to have Python, it's modules and
> sometimes documentation installed in particular place; usually
> somewhere in my home directory. My script installs some additional

<snip>

> I've written this script in bash, because I thought it would be better
> to have a script which would run in environment without Python (it all
> was about installing Python anyway!). I used bash, dialog, wget... And
> now someone suggested, that I shuld use Python. That using Python would
> lead to clearer and - probably - smaller code. (I have to admit it - my
> code in bash is just messy.)
> 
> And now I'm considering this idea. Python is already present on
> (almost?) every distribution today, so why worry about it's presence?

<snip>

> But, on the other hand, I'm thinking that writing in bash is more
> universal solution. I mean that requirements to run bash scripts are
> lower than requirements to run Python scripts. Could this requirements
> be decisive for some users (or is it only my imagination)? Sometimes
> users just have no access to Python (e.g. LFS, some stages of Gentoo,
> some rescue and specialized distros).

<snip>

> Well, what do you think?

I'm not a sophisticated programmer (I wouldn't know a bash script if 
it bit me).

So, to make sure I've understood (the issue is my level of knowledge, 
not your level of English): you want to provide a specialized install 
script for Python (3rd party modules, non-standard locations, etc.) 
You started in bash to deal with minority cases without an extant 
Python install. But clearly, there will be a Python install by the 
time your bash script is done, or something will have gone very wrong.

That suggests implementing the custom installation work in Python, and 
having a bash script that will

1) determine if there is an existing Python install,
2) if there is not, install Python in the standard way,
3) using the now guaranteed to be there installation of Python, run 
your Python script that does all of your custom installation, and
4) if step (2) added a Python installation other than the one added by 
step (3), perhaps remove it.

Am I missing some reason why that wouldn't be a satisfactory option? 
(This is entirely possible :-)

Best,

Brian vdB

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to