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

Re: python / python3 3 pybuild and bin script



On 02/01/2014 04:10 PM, PICCA Frederic-Emmanuel wrote:
> Hello,
> 
> I am packaging the next version of spyder which is a python IDE.
> The next version will support python3
> 
> so I need to add a spyder3 binary package which will contain
> /usr/bin/spyder3
> 
> the upstream script only create /usr/bin/spyder during the build
> 
> So my question is do we have something in pybuild which help to rename a script
> and add 3 at the end of the official script.
> 
> If not can you explain in the wiki how to proceed in thaht case
> 
> It is quite usuall to add a 3 at the end of the scripts for python3 version.

Hi,

Thanks for raising this important topic.

What I've been doing up to now, is renaming "foo" into "python3-foo" and
"python2-foo", then I use update-alternatives to provide /usr/bin/foo,
with the python2 version having the priority. Sometimes I've even used
"foo-python3" and "foo-python2" (and I feel bad about my lack of
consistency, though since we have no defined standards...).

Though I'm seeing that you just add a "3" to the python3 version, which
in some way works well too. Though do you also add a "2" for the python2
version? Do you use update-alternatives?

Also, I've experienced that using update-alternatives the correct way is
somehow counter-intuitive and badly documented (see: #71621).

Thoughts anyone? What would you consider best practice?

Cheers,

Thomas


Reply to: