dev-lang/python: Fix epython.py module first install
authorMichał Górny <mgorny@gentoo.org>
Thu, 12 Nov 2015 14:44:34 +0000 (15:44 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 12 Nov 2015 16:03:16 +0000 (17:03 +0100)
Fix the issues in obtaining sitedir for epython.py module install when
dev-lang/python is not yet installed.

13 files changed:
dev-lang/python/python-2.7.10-r2.ebuild
dev-lang/python/python-2.7.10-r3.ebuild
dev-lang/python/python-2.7.10.ebuild
dev-lang/python/python-2.7.9-r1.ebuild
dev-lang/python/python-3.3.5-r1.ebuild
dev-lang/python/python-3.3.5-r2.ebuild
dev-lang/python/python-3.3.5-r3.ebuild
dev-lang/python/python-3.4.1.ebuild
dev-lang/python/python-3.4.3-r2.ebuild
dev-lang/python/python-3.4.3-r3.ebuild
dev-lang/python/python-3.4.3.ebuild
dev-lang/python/python-3.5.0-r1.ebuild
dev-lang/python/python-3.5.0-r2.ebuild

index a8eeb9f16d8113c82a24b0142f49c26ba1931886..2bb8c27092ad03cdf18835ac4d06e17c6f89ac57 100644 (file)
@@ -306,16 +306,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 31c6506f0e69ceb8306cafcff6ab24728a368b1c..b6aeaf79875c23ac5d0f73664a14ce0a2932ee85 100644 (file)
@@ -304,16 +304,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 2d6f00d0b1bc7c7b828981e68355ea9467b9a4b6..8f7a6768707380a008e84f8920d306c9533ddb16 100644 (file)
@@ -314,16 +314,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 20cdedb0ea7fa26e823bc70e270813005319e50d..1e9eb6ae3249b3a73d06b10c89a437aadc0242f2 100644 (file)
@@ -315,16 +315,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 64e520ba1e96c69b12cc49962bb59cd849a2cd14..c790c996d67548a31bc5f1b338cc3c5b8dfb59ee 100644 (file)
@@ -280,16 +280,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index b6256f8e709b509fc94fa94deb2aa2cb344eba10..f35f7efc7e10699266c6a8ef731b10053a23d669 100644 (file)
@@ -286,16 +286,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 4b773d22ffffa9f0fc3f1ee980ae3cdd3368cd14..3049ce1f71bc1735d222c3ae4b5325cd06d0b4c8 100644 (file)
@@ -291,16 +291,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
 
        # for python-exec
-       python_export python${PYVER} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${PYVER}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 5c5df4c798b4381bb1e38034fdc20f4ceb4e20a4..2f271ee72a0e8a4e650f33cb320f794d534b9b2f 100644 (file)
@@ -276,15 +276,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 86ebb5e5c6b2c61dddf91e0125c4d03b71d68552..aea8b53602d9bede07062c293d662f88d1347a34 100644 (file)
@@ -267,16 +267,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index dba49e89bb85db63d56b43b4ea46bc640c51144d..aaaa72aca1526ebede79b32adef2f0439f27fe13 100644 (file)
@@ -274,16 +274,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
 
        # for python-exec
-       python_export python${PYVER} EPYTHON PYTHON PYTHON_SITEDIR
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${PYVER}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index 3ab43cf075af2c753d4fe03cce00d2d05913ba71..2f95394cf7a99ab239171ed6a2129942fb0fdaf0 100644 (file)
@@ -275,16 +275,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index d808c8357f5a240c35bcf9459c8888c865a20ddc..e67b55e388e6508aef2aad44269b4f6c5b891869 100644 (file)
@@ -273,16 +273,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
 
        # for python-exec
-       python_export python${SLOT} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${SLOT}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }
 
index e3293e3792e4e6fa7e89bc9877ecf7d7e080d924..caa9e3531aeb5d55b46ba8f908e9606ccea32588 100644 (file)
@@ -277,16 +277,18 @@ src_install() {
                -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
 
        # for python-exec
-       python_export python${PYVER} EPYTHON PYTHON
-       export PYTHON_SITEDIR="${EPREFIX}/usr/$(get_libdir)/python${PYVER}/site-packages"
+       local vars=( EPYTHON PYTHON_SITEDIR )
 
        # if not using a cross-compiler, use the fresh binary
        if ! tc-is-cross-compiler; then
-               local PYTHON=./python
+               local -x PYTHON=./python
                local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
        fi
 
-       echo "EPYTHON='${EPYTHON}'" > epython.py
+       python_export "python${PYVER}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
        python_domodule epython.py
 }