summaryrefslogtreecommitdiff
blob: f35cd2c8f0dfded9f9e137d03d07fe7b18ffd7fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 3a5909537315dbe624fbd242d8ab25f3926465fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sun, 28 Feb 2016 17:04:40 +0100
Subject: [PATCH] Use pythonX.Y-config instead of python-config-X.Y

---
 python.eselect.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python.eselect.in b/python.eselect.in
index 9a52791..c40483a 100644
--- a/python.eselect.in
+++ b/python.eselect.in
@@ -46,9 +46,9 @@ set_python_config() {
 #!/usr/bin/env bash
 # Gentoo python-config wrapper script
 
-[[ "\${EPYTHON}" =~ (/|^python\$) ]] && EPYTHON="${target/-config-/}"
-python_config="\${EPYTHON/python/python-config-}"
-"\${0%/*}/\${python_config:-${target}}" "\$@"
+[[ "\${EPYTHON}" =~ (/|^python\$|^$) ]] && EPYTHON="${target%-config}"
+python_config="\${EPYTHON}-config"
+"\${0%/*}/\${python_config}" "\$@"
 EOF
 	chmod a+rx "${script}"
 }
@@ -121,7 +121,7 @@ set_scripts_and_symlinks() {
 		ln -nfs "${target}" "${target%.*}"
 		if [[ "${SET_MAIN_ACTIVE_PYTHON_INTERPRETER}" == "1" ]]; then
 			set_python "${target}"
-			set_python_config "${target/python/python-config-}"
+			set_python_config "${target}-config"
 			ln -nfs "${target/python/pydoc}" pydoc
 			# idle is optionally installed
 			if [[ -f "${target/python/idle}" ]]; then
-- 
2.7.2