Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o
Subject: [gentoo-dev] [PATCHSET python-utils-r1] python & python-config wrapper cleanup
Date: Sat, 25 Jul 2015 10:38:16
Message-Id: 1437820664-28757-1-git-send-email-mgorny@gentoo.org
1 Hi,
2
3 A small batch of patches intended to improve & fix
4 python_wrapper_setup(), pretty much thanks to perfinion.
5
6 Long story short, he noticed two issues:
7
8 1. we are missing pythonN-config, both in wrappers and in eselect-python
9 (addressed by patch 2),
10
11 2. since python3.4, some symlink reading magic is applied that causes
12 python to use wrong prefixes if python-config is symlinked somewhere
13 (addressed by patch 1).
14
15 While at it, I also added some 'unsupported' wrappers to ban trying to
16 use pythonY (accidental fallback to system python) when pythonX is
17 selected via wrapper, and changed the exit code for unsupp-scripts.
18
19 Patches 1 & 4 should be harmless.
20
21 Patch 2 should not cause issues either. Some scripts may start using
22 pythonN-config when they used to fallback to python-config. However,
23 fixing eselect-python side of this may actually cause issues if this
24 causes configure scripts to prefer python3-config over wrapped
25 python2-config. Patch 3 addresses this.
26
27 Patch 3 is going to cause issues if configure scripts look for
28 pythonN-config before python-config. For example, in python2.7 they are
29 going to find python3-config and try (and fail) to use that, while right
30 now they falled back to python-config. However, the worse would happen
31 if we fixed eselect-python without committing this patch first.

Replies