Hi,

A quick patch set I've created a few days ago and enabled
on python-wrapper-full-replacement branch (on my github fork of gentoo).

Currently the wrapping of Python executables is a mess. The python
executable is wrapped using python-wrapper. python-config has a custom
generated wrapper, and python[23] are just symlinks (so no wrapping),
similarly to a few remaining Python executables.

My idea is to use python-exec for everything. Long story short, I
modified all newest revisions (in the branch) to install appropriate
symlinks in /usr/lib/python-exec/... so that python-exec can recognize
all Python executables appropriately. I've taken all the executables
that make sense for new Python versions -- python, pythonN,
python-config, pythonN-config, pydoc, 2to3, pyvenv.

Now that python-exec is aware of the stuff, I just modified
eselect-python to stop playing with the stuff and just handle
configuration and symlinks for non-executable stuff (manpages,
frameworks like we ever cared about those). Instead, the ebuild installs
a few appropriate symlinks to python-exec (that replace those created by
eselect-python in the past).

In other words, if you spawn 'python3', then python-exec simply looks
through /usr/lib/python-exec/*/python3 to select the most preferred
version. Since only dev-lang/python-3.* install 'python3' symlinks
there, only those are considered. All the magic works and everyone is
happy.

As you can see, the ebuild changes (not included there) are kinda more
important yet the patchset accompanies them well. It specifically:

1. adds .lz manpage support. Not that the whole hardcoded compressor
list makes sense but it at least silences the error for me.

2. Moves python[23] selections to a file. Currently, they are 'stored'
in the symlink which is non-portable and collides with the new wrapper.

3. Kills the code that created all executable symlinks.

4. Kills python-wrapper since it is no longer used.

Stay tuned for ebuild patches.

--
Best regards,
Michał Górny


Reply via email to