В Сбт, 19/12/2009 в 16:24 +0100, Arfrever Frehtes Taifersar Arahesis
пишет:
>   - Scripts of packages supporting only e.g. Python 2 can be executed 
> (without necessity
>     of using of e.g. "python2 /usr/bin/${script}") after activating of e.g. 
> Python 3.
>   - Scripts of packages supporting multiple Python versions ignore active 
> Python version.

> The best solution, which removes these 2 disadvantages and preserves the 
> advantage, seems
> to be to rename Python scripts to include Python version [1] in filenames, 
> and create wrapper
> scripts, which call appropriate target scripts [2].

But still additional wrapper scripts and increased number of scripts in
total is not really nice. What do you think about another solution:

Separate possible script's python API versions into database, e.g.
in /var/db/pyabi/${CATEGORY}/${PN}-${SLOT}. Create python wrapper only
for unmerged but still in use (found from pyabi db) python versions,
e.g. /usr/bin/python3.2 in case you've unmerged python, but scripts
still reference python3.2.

This way scripts that use python versions that are still in the tree
will work without any overhead, fewer scripts in /{usr,}bin and during
python merge/unmerge it is possible to warn user about scripts that use
unmerged python versions (and thus run with some overhead). I guess
still we can add some user defined variable to prefer some python
versions over another...

>   - Scripts of packages supporting multiple Python versions cannot be easily 
> (without
>     necessity of using of e.g. "python3.1 /usr/bin/${script}") executed with 
> a Python
>     version different than active Python version.

If you develop on python then... write your own wrappers or
use /usr/bin/python and that's it! In case you are not I'm not sure why
such switching is useful. Could you elaborate?

-- 
Peter.


Reply via email to