diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-14 18:52:15 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-14 18:52:15 +0100 |
commit | d00821e77f72d4af4ea30158c1c6e18ffff0875b (patch) | |
tree | b28b6cb077ae6b2457e30d49028fc978d8e2b59b /dev-lang/python-exec/python-exec-9999.ebuild | |
parent | 36ac65103bf5503e5bad1ecc7e8cb9e7643f6840 (diff) | |
parent | 6a339b4f9ec107438bb71a6f9ca72fd42fbfd436 (diff) |
Merge branch 'next'
Diffstat (limited to 'dev-lang/python-exec/python-exec-9999.ebuild')
-rw-r--r-- | dev-lang/python-exec/python-exec-9999.ebuild | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/dev-lang/python-exec/python-exec-9999.ebuild b/dev-lang/python-exec/python-exec-9999.ebuild index f5c7a17a180b..b37d3e0c3b6f 100644 --- a/dev-lang/python-exec/python-exec-9999.ebuild +++ b/dev-lang/python-exec/python-exec-9999.ebuild @@ -33,8 +33,10 @@ src_prepare() { src_configure() { local pyimpls=() i EPYTHON for i in "${_PYTHON_ALL_IMPLS[@]}"; do - python_export "${i}" EPYTHON - pyimpls+=( "${EPYTHON}" ) + if use "python_targets_${i}"; then + python_export "${i}" EPYTHON + pyimpls+=( "${EPYTHON}" ) + fi done local myconf=( @@ -53,13 +55,29 @@ src_install() { newins - python-exec.conf \ < <(sed -n -e '/^#/p' config/python-exec.conf.example) + local programs=( python ) + local scripts=( python-config 2to3 idle pydoc pyvenv ) + local i + for i in "${_PYTHON_ALL_IMPLS[@]}"; do + if use "python_targets_${i}"; then + # NB: duplicate entries are harmless + if python_is_python3 "${i}"; then + programs+=( python3 ) + scripts+=( python3-config ) + else + programs+=( python2 ) + scripts+=( python2-config ) + fi + fi + done + local f - for f in python{,2,3}; do + for f in "${programs[@]}"; do # symlink the C wrapper for python to avoid shebang recursion # bug #568974 dosym python-exec2c /usr/bin/"${f}" done - for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do + for f in "${scripts[@]}"; do # those are python scripts (except for new python-configs) # so symlink them via the python wrapper dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}" |