On czw, 2017-04-20 at 13:28 +0700, grozin@gentoo.org wrote: > Many thanks to the python team for good work. > > In some cases a package installs some script(s) which run python > interpreter. I mean IDE-like packages, e.g., spyder, bpython, ptpython, > etc. A user may want to run either python2 or python3 using such IDE. The > "standard" behaviour is to install a single script which runs python2 or > python3 depending on eselect python. In the case of spyder, there was a > user who insisted that he wants to use spyder for python2 *and* python3, > without changing the global eselect python setting. I've changed the > ebuild to install 3 scripts: spyder (behaves as above), spyder2, and > spyder3. The same may be useful for bpython, ptpython, and, maybe, some > other packages. Are there plans to make this task easy and systematic, > without re-inventing the wheel in each ebuild? > Well, your explanation seemed a little bit unclear to me, so I'd like to clarify first. I presume you mean creating additional 'wrappers' that start the package with a specific implementation; i.e. in spyder, you have: python_newscript scripts/${PN} ${PN}${EPYTHON:6:1} For this thing, I don't think it really beneficial to provide additional methods. In most cases where this is really useful, upstream already creates additional names, and the eclasses handle wrapping them just fine. Doing it causes a few problems: how to name them? How detailed should they be? I.e. if it should be just spyder2 and spyder3, or maybe spyder2.7, spyder3.4, spyder3.5... How to handle pypy/pypy3? This usually quite sucks, and I don't want the eclass to make arbitrary guesses about that. That said, you could make your code pypy-safer if you did: local suffix python_is_python3 && suffix=3 || suffix=2 python_newscript scripts/${PN} ${PN}${suffix} Plus, the user can set EPYTHON to alter the implementation without using eselect. Or run scripts directly from /usr/lib/python-exec/*. I should probably add that to the python-exec doc [1]. It's possible it's already somewhere in the docs but I can't find it ;-). [1]:https://wiki.gentoo.org/wiki/Project:Python/python-exec -- Best regards, Michał Górny