[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Status report on python2 transition (possible solution)



On Fri, Jul 13, 2001 at 06:27:20PM -0400, David M. Cooke wrote:
| At some point, D-Man <dsh8290@rit.edu> wrote:
| > On Fri, Jul 13, 2001 at 11:30:28PM +0200, Carel Fellinger wrote:
| > | On Fri, Jul 13, 2001 at 03:25:20PM -0400, D-Man wrote:
| > | ...
| > | > o   The #! line should look something like
| > | >         #!/usr/bin/deb_py_ver 1.5.2 -
| > | 
| > | I can't get things like this to work.  It seems one parameter at
| > | most is allowed there.  
| > 
| > Huh?  The idea was that there would be a script/program named
| > deb_py_ver.  It would take 2 command-line arguments and determine
| > which python binary should be used.  It would then exec that python on
| > the script (which, IIRC, is on stdin of deb_py_ver).  This would allow
| > having a single program, rather than an exponentially growing number
| > of symlinks.  Otherwise the symlink idea is the simplest
| > implementation, except for handling which package to put each link in.
| 
| That's not the problem -- the problem is that the command specified in
| the #! is passed the rest of the line as _one_ argument (at least on
| Linux). That's why you can't do, for instance,
| 
| #!/usr/bin/env python -O
| 
| as the first line.

I thought that would work, which is why I was confused :-).

| I suppose you could split the argument on spaces -- although I'm not sure if
| other Unices (the Hurd, anyone?) pass the rest of the line or just the first
| argument.
| 
| Another alternative would be
| 
| #!/usr/bin/deb_py_ver 1.5.2-
| 
| and
| 
| #!/usr/bin/deb_py_ver 1.5.2-2.1.1
| 
| That's one argument.

Ok, sure, replace the space separator between the versions with a
different ASCII separator.

-D



Reply to: