diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-11-11 12:42:09 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-11-11 12:44:14 +0100 |
commit | f91712b9bc960c8b0162b546a48a51d7e299fbe6 (patch) | |
tree | a836e4eee7999fd47cb1326eb807e6e26ae7db82 /dev-lang/python/python-3.5.0-r2.ebuild | |
parent | ad6cfeec15079a87f869dc008c505d0664bcc103 (diff) | |
download | gentoo-f91712b9bc960c8b0162b546a48a51d7e299fbe6.tar.gz gentoo-f91712b9bc960c8b0162b546a48a51d7e299fbe6.tar.xz |
dev-lang/python: Correct SLOT use after subslot introduction
Diffstat (limited to 'dev-lang/python/python-3.5.0-r2.ebuild')
-rw-r--r-- | dev-lang/python/python-3.5.0-r2.ebuild | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/dev-lang/python/python-3.5.0-r2.ebuild b/dev-lang/python/python-3.5.0-r2.ebuild index 4e541d502b6..30e4d9f8b4e 100644 --- a/dev-lang/python/python-3.5.0-r2.ebuild +++ b/dev-lang/python/python-3.5.0-r2.ebuild @@ -56,6 +56,8 @@ PDEPEND="app-eselect/eselect-python" S="${WORKDIR}/${MY_P}" +PYVER=${SLOT%/*} + src_prepare() { # Ensure that internal copies of expat, libffi and zlib are not used. rm -fr Modules/expat @@ -217,7 +219,7 @@ src_test() { done elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" + elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'" elog "and run the tests separately." if [[ ${result} -ne 0 ]]; then @@ -226,7 +228,7 @@ src_test() { } src_install() { - local libdir=${ED}/usr/$(get_libdir)/python${SLOT} + local libdir=${ED}/usr/$(get_libdir)/python${PYVER} cd "${BUILD_DIR}" || die @@ -235,7 +237,7 @@ src_install() { sed \ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ -e "s/\(PY_LDFLAGS=\).*/\1/" \ - -i "${libdir}/config-${SLOT}"*/Makefile || die "sed failed" + -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed" # Fix collisions between different slots of Python. rm -f "${ED}usr/$(get_libdir)/libpython3.so" @@ -243,14 +245,14 @@ src_install() { # Cheap hack to get version with ABIFLAGS local abiver=$(cd "${ED}usr/include"; echo python*) # Replace python3.X with a symlink if appropriate - if [[ ${abiver} != python${SLOT} ]]; then - rm "${ED}usr/bin/python${SLOT}" || die - dosym "${abiver}" "/usr/bin/python${SLOT}" + if [[ ${abiver} != python${PYVER} ]]; then + rm "${ED}usr/bin/python${PYVER}" || die + dosym "${abiver}" "/usr/bin/python${PYVER}" fi use elibc_uclibc && rm -fr "${libdir}/test" use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} + use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} use threads || rm -fr "${libdir}/multiprocessing" use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe @@ -267,15 +269,15 @@ src_install() { emake --no-print-directory -s -f - 2>/dev/null) newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER} + newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER} sed \ - -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ - -e "s:@PYDOC@:pydoc${SLOT}:" \ - -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${PYVER}:" \ + -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed" # for python-exec - python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR + python_export python${PYVER} EPYTHON PYTHON PYTHON_SITEDIR # if not using a cross-compiler, use the fresh binary if ! tc-is-cross-compiler; then @@ -288,7 +290,7 @@ src_install() { } pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then + if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then python_updater_warning="1" fi } |