1 |
commit: 2d8d447f040148e4374a00c9fca323e537a92cd1 |
2 |
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 25 09:58:19 2019 +0000 |
4 |
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 25 09:58:35 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2d8d447f |
7 |
|
8 |
dev-lang/python: drop .exe from script shebangs |
9 |
|
10 |
Python creates symlink usr/bin/python3.6.exe->python3.6m.exe and uses |
11 |
usr/bin/python3.6.exe as shebang. As we recreate python3.6 without .exe |
12 |
and Cygwin would resolve python3.6 to both python3.6 and python3.6.exe, |
13 |
we can just drop the .exe extensions from shebangs, even if we won't |
14 |
recreate any symlink. |
15 |
|
16 |
Package-Manager: Portage-2.3.55.1-prefix, Repoman-2.3.12 |
17 |
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org> |
18 |
|
19 |
dev-lang/python/python-3.6.6.ebuild | 6 ++++++ |
20 |
1 file changed, 6 insertions(+) |
21 |
|
22 |
diff --git a/dev-lang/python/python-3.6.6.ebuild b/dev-lang/python/python-3.6.6.ebuild |
23 |
index 3003efd0da..78ddb6364b 100644 |
24 |
--- a/dev-lang/python/python-3.6.6.ebuild |
25 |
+++ b/dev-lang/python/python-3.6.6.ebuild |
26 |
@@ -308,6 +308,12 @@ src_install() { |
27 |
# Fix collisions between different slots of Python. |
28 |
rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
29 |
|
30 |
+ if use elibc_Cygwin; then |
31 |
+ # We may recreate symlinks, but without any .exe extension. Cygwin |
32 |
+ # can resolv either without it, so just drop .exe from shebangs: |
33 |
+ sed -i -e '1s/\.exe//' "$ED"/usr/bin/* || die |
34 |
+ fi |
35 |
+ |
36 |
# Cheap hack to get version with ABIFLAGS |
37 |
local abiver=$(cd "${ED}usr/include"; echo python*) |
38 |
if [[ ${abiver} != python${PYVER} ]]; then |