When a Python package is built for multiple Python ABIs, the scripts are installed from a random (last built?) ABI. This causes them to have fixed shebang at unusually old Python version (here 2.6). Seems like a design flaw.
Ebuild? PS. You're free to change the eclass too.
eclean-kernel. Not that I have an idea how to handle that :P.
(In reply to comment #2) > eclean-kernel. Not that I have an idea how to handle that :P. No problem - I'll look into it, can you please: 1. attach ebuild that uses p-d-ng.eclass 2. ebuild eclean-kernel...eclass install && head -n 3 /var/tmp/portage/app-portage/eclean-kernel/image/usr/bin/*
Ok - found it, you need to tell eclass that you want to install a script: $ cvs diff eclean-kernel-0.3.ebuild Index: eclean-kernel-0.3.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/app-admin/eclean-kernel/eclean-kernel-0.3.ebuild,v retrieving revision 1.1 diff -u -r1.1 eclean-kernel-0.3.ebuild --- eclean-kernel-0.3.ebuild 11 May 2012 17:35:25 -0000 1.1 +++ eclean-kernel-0.3.ebuild 15 May 2012 18:38:35 -0000 @@ -24,4 +24,5 @@ python_install_all() { dodoc README + python-distutils-ng_redoscript "/usr/bin/${PN}" } I wonder whenever we should do some auto-magic to scripts installed in {,/usr}/{,s}bin/ - opinion?
Ouch, that looks like another Python eclass... I'd really prefer just having a single binary with #!/usr/bin/env python...
Created attachment 311893 [details, diff] python-distutils-ng.eclass-auto-redo.patch (In reply to comment #5) > Ouch, that looks like another Python eclass... I'd really prefer just having > a single binary with #!/usr/bin/env python... Hm.. I like having separate scripts for each implementation. I don't think we can support both approaches at the same time without introducing a global variable that would be user controllable, but this is bad because users would end up with different results for same builds. For now we can add this to eclass to automate this a little.
(In reply to comment #6) > Created attachment 311893 [details, diff] [details, diff] > python-distutils-ng.eclass-auto-redo.patch > > (In reply to comment #5) > > Ouch, that looks like another Python eclass... I'd really prefer just having > > a single binary with #!/usr/bin/env python... > > Hm.. I like having separate scripts for each implementation. I don't think > we can support both approaches at the same time without introducing a global > variable that would be user controllable, but this is bad because users > would end up with different results for same builds. > > For now we can add this to eclass to automate this a little. Would be great. You can, however, just pass all the paths and skip the checking part since you are doing 2>/dev/null anyway.
Created attachment 312561 [details, diff] python-distutils-ng.eclass-auto-redo.patch Good point, I'm committing this version; the only change is what you've suggested.
I've committed documentation too: +# @ECLASS-VARIABLE: PYTHON_DISABLE_SCRIPT_REDOS +# @DEFAULT_UNSET +# @DESCRIPTION: +# Set to any value to disable automatic reinstallation of scripts in bin +# directories. See python-distutils-ng_src_install function.