[Distutils] easy_install and Unix python with sys.prefix different from sys.exec_prefix

Phillip J. Eby pje at telecommunity.com
Thu Nov 16 17:53:22 CET 2006


At 04:01 PM 11/16/2006 +0100, Berthold Höllmann wrote:
>I'll certainly give it a try, but why so much hassle for the person
>installing, when the required information is easily avaliable for the
>easy_install tool? Hey I read "easy_install" ;-)

Precisely!  Your current directory layout and sharing are intended to work 
around the fact that in the past, installation of Python packages has *not* 
been easy for you.  If you were starting today, you wouldn't *bother* to do 
such a complex setup as you're doing, because:

   It would actually be EASIER to just run easy_install ONCE for
   each machine or Python installation you needed a package
   installed for!

(It would also be simpler, as there would be no NFS, no split 
prefix/exec-prefix, etc., etc.  At most, you could have an NFS cache 
directory to save on repeated downloads, as I suggested in a previous post.)

So the problem isn't that easy_install is hard, the problem is that you're 
attempting to make it do something that's really not necessary, because 
you're accustomed to doing it that way.  Nonetheless, I have given you 
instructions to make it work; you just don't like them.  :)


>This still does not solve the problem with the "#!" or shebang lines
>in scripts.

There is no problem, as I understand it.  Install scripts to the 
exec_prefix/bin directories, and they will run the appropriate Python.


>Especially when installing modules, I think using the full
>path to the python executable is wrong.

Ah, there's the problem!  Just stop thinking that, and all will be fine.  ;)


>I'm still pleading for a way to customize the string after the "#!" part.

If you really want to spend the effort to do that, I suggest you look at 
zc.buildout, which extensively wraps setuptools and contains its own #! 
generation.  However it will likely be a lot of work for you to do, to 
satisfy a concern that is purely a matter of taste rather than functional 
necessity.  (Assuming, again, that I actually understand your requirements 
correctly.)



More information about the Distutils-SIG mailing list