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

Re: usr/bin/ scripts for console_scripts which lead to binaries-have-file-conflict when python 2 + 3



On Mon, Dec 16, 2013 at 14:19:32 +0100, Olivier Berger wrote:

> Jakub Wilk <jwilk@debian.org> writes:
> 
> > * Olivier Berger <olivier.berger@telecom-sudparis.eu>, 2013-12-16, 13:24:
> >>- add a python-rdflib-tools package that contains shell scripts of the 
> >>form :
> >>
> >>  #!/bin/sh
> >>
> >>  exec /usr/bin/python -m rdflib.tools.csv2rdf $*
> >
> > I can't see how that's better than a script with #!/usr/bin/python 
> > shebang...
> >
> 
> Well... it's essentially easier than altering the modules to provide
> them with a sheebang, making them executable and shipping
> symlinks... whose targets wouldn't be the same in the v2 and v3
> package...
> 
> >>- make this package depend on python-rdflib | python3-rdflib
> >
> > /usr/bin/python can't use the modules shipped by python3-rdflib.
> >
> 
> Ah, thanks for spotting this... I thought it was a bit too easy indeed
> ;)
> 
> Hmmm... Maybe this is better :
> 
>   #!/bin/sh
>   
>   /usr/bin/python3 -c 'import rdflib.tools.csv2rdf' 2>/dev/null
>   if [ "$?" = "0" ]
>   then
>       exec /usr/bin/python3 -m rdflib.tools.csv2rdf $*
>   else
>       exec /usr/bin/python -m rdflib.tools.csv2rdf $*
>   fi
> 
> What do you think ?
> 
FWIW I think it's terrible and you should just pick one, and ship that.

Cheers,
Julien
-- 
Julien Cristau          <julien.cristau@logilab.fr>
Logilab		        http://www.logilab.fr/
Informatique scientifique & gestion de connaissances


Reply to: