python-config shows the last version of python that was emerged, while the symlinks stick with highest version, which is fine by me. But since it runs the version that the symlink refers to as will the python apps that get built now, the python-config should respond with that version instead. Suggest either giving it the same symlink treatment as /usr/bin/python, or adding the code to make python-config report the running version instead of hardcoded values. Ugly yet functional example of that at the bottom of this. Silver python # emerge -k =dev-lang/python-2.2.3-r6 2>&1 > /dev/null Silver python # ll /usr/bin | grep python lrwxrwxrwx 1 root root 9 Apr 9 16:35 python -> python2.3 -rwxr-xr-x 1 root root 178 Apr 9 16:32 python-config lrwxrwxrwx 1 root root 9 Apr 9 16:35 python2 -> python2.3 -rwxr-xr-x 1 root root 1006964 Apr 9 16:32 python2.2 -rwxr-xr-x 1 root root 6012 Apr 9 15:53 python2.3 Silver python # python-config -lpython2.2 -lm -L/usr/lib/python2.2/config Silver python # emerge -k =dev-lang/python-2.3.5 2>&1 > /dev/null Silver python # ll /usr/bin | grep python lrwxrwxrwx 1 root root 9 Apr 9 17:06 python -> python2.3 -rwxr-xr-x 1 root root 178 Apr 9 17:04 python-config lrwxrwxrwx 1 root root 9 Apr 9 17:06 python2 -> python2.3 -rwxr-xr-x 1 root root 1006964 Apr 9 16:32 python2.2 -rwxr-xr-x 1 root root 6012 Apr 9 17:04 python2.3 Silver python # python-config -lpython2.3 -lm -L/usr/lib/python2.3/config Silver python # emerge -k =dev-lang/python-2.2.3-r6 2>&1 > /dev/null Silver python # ll /usr/bin | grep python lrwxrwxrwx 1 root root 9 Apr 9 17:12 python -> python2.3 -rwxr-xr-x 1 root root 178 Apr 9 17:11 python-config lrwxrwxrwx 1 root root 9 Apr 9 17:12 python2 -> python2.3 -rwxr-xr-x 1 root root 1006964 Apr 9 17:11 python2.2 -rwxr-xr-x 1 root root 6012 Apr 9 17:04 python2.3 Silver python # python-config -lpython2.2 -lm -L/usr/lib/python2.2/config Silver python # emerge -k =dev-lang/python-2.4-r3 2>&1 > /dev/null Silver python # ll /usr/bin | grep python lrwxrwxrwx 1 root root 9 Apr 9 18:06 python -> python2.4 -rwxr-xr-x 1 root root 179 Apr 9 18:05 python-config lrwxrwxrwx 1 root root 9 Apr 9 18:06 python2 -> python2.4 -rwxr-xr-x 1 root root 1006964 Apr 9 17:11 python2.2 -rwxr-xr-x 1 root root 6012 Apr 9 17:04 python2.3 -rwxr-xr-x 1 root root 6012 Apr 9 18:05 python2.4 Silver python # python-config -lpython2.4 -lm -L/usr/lib/python2.4/config -L/usr/lib -lz This could likely be written prettier, but something like this would make the perl-config report the actual version of what is symlinked: #!/usr/bin/python import sys, distutils.sysconfig, string thisversion = "%d.%d" % (sys.version_info[0] , sys.version_info[1]) print "-lpython%s -lm -L/usr/lib/python%s/config"%(thisversion,thisversion),string.join(string.split(distutils.sysconfig.get_config_var("MODLIBS")))
that is a good point. although i'm not quite sure how many apps use python-config. as far as i know, this is something concocted before distutils.
I believe this is fixed with the 2.4.3-r3 as part of the anti-collision changes. In the upcoming python-2.5 there will be a proper python-config from upstream too.