app-eselect/eselect-python: Replace python{,2,3} symlinks with files
authorMichał Górny <mgorny@gentoo.org>
Wed, 25 Nov 2015 12:35:51 +0000 (13:35 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 25 Nov 2015 12:37:03 +0000 (13:37 +0100)
Copy python-exec script to /usr/bin/python{,2,3} rather than symlinking
it because a lot of Python scripts like to readlink(sys.executable) and
don't expect to find python-exec in there...

app-eselect/eselect-python/eselect-python-20151117-r1.ebuild [moved from app-eselect/eselect-python/eselect-python-20151117.ebuild with 89% similarity]
app-eselect/eselect-python/eselect-python-99999999.ebuild

similarity index 89%
rename from app-eselect/eselect-python/eselect-python-20151117.ebuild
rename to app-eselect/eselect-python/eselect-python-20151117-r1.ebuild
index f78b25f806a31c583bb4620c22f1fe2df8a63d1c..7fb2788fe01d81fa3f6536d73c239a04224f4208 100644 (file)
@@ -35,7 +35,12 @@ src_install() {
        emake DESTDIR="${D}" install || die
 
        local f
-       for f in python{,2,3}{,-config} 2to3 pydoc pyvenv; do
+       for f in python{,2,3}; do
+               # can't use symlinks here since random stuff
+               # loves to do readlink on sys.executable...
+               newbin "${EPREFIX}/usr/lib/python-exec/python-exec2" "${f}"
+       done
+       for f in python{,2,3}-config 2to3 pydoc pyvenv; do
                dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}"
        done
 }
index f78b25f806a31c583bb4620c22f1fe2df8a63d1c..7fb2788fe01d81fa3f6536d73c239a04224f4208 100644 (file)
@@ -35,7 +35,12 @@ src_install() {
        emake DESTDIR="${D}" install || die
 
        local f
-       for f in python{,2,3}{,-config} 2to3 pydoc pyvenv; do
+       for f in python{,2,3}; do
+               # can't use symlinks here since random stuff
+               # loves to do readlink on sys.executable...
+               newbin "${EPREFIX}/usr/lib/python-exec/python-exec2" "${f}"
+       done
+       for f in python{,2,3}-config 2to3 pydoc pyvenv; do
                dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}"
        done
 }