[katello-devel] Why #!/usr/bin/env ?

James Bowes jbowes at redhat.com
Tue Jul 24 10:45:02 UTC 2012


On Mon, Jul 23, 2012 at 11:11:40PM +0200, Miroslav Suchy wrote:
> On 23.7.2012 23:05, Eric Sammons wrote:
> >>>among developers. Then python can live in ~/myenv/bin/python as
> >>>>  >  well as
> >>>>  >  many dependencies under ~/myenv/lib/python2.X/site-packages which
> >>>>  >  /usr/bin/python will never find, or worse, different versions. I
> >>>>  >  imagine
> >>>>  >  something similar may exist in the ruby world.
> 
> And that ~/myenv/bin/python is python 2.4, 2.6, or 3.0? All of them
> behave *very* differently.
>

You can't ensure that /usr/bin/python is a particular version, either.
Unless you use a versioned rpm dep pinned at some particular version, as
'>=' will likely break you down the road, anyways.

I've always enjoyed simply supporting as many python versions as
possible from a single code base. It makes for a delightful intellectual
exercise.

> >Again wrt virtualenv, here is an example:
> >
> >$ virtualenv testme
> >$ cd testme
> >$ source bin/activate
> >$ which python
> >~/testme/bin/python
> >
> >Note, if you were using /usr/bin/python you would_not_  be testing the python binary in "testme".
> 
> That can be ok for quick'n'dirty code, where you want fast
> alternation without too much work. But who would do such thing in
> production?
> 
> Mirek
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel

-James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/katello-devel/attachments/20120724/6b8820b6/attachment.sig>


More information about the katello-devel mailing list