diff options
Diffstat (limited to 'dev-lang/python/python-3.1.1-r1.ebuild')
-rw-r--r-- | dev-lang/python/python-3.1.1-r1.ebuild | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/dev-lang/python/python-3.1.1-r1.ebuild b/dev-lang/python/python-3.1.1-r1.ebuild index 0fa9fb5c8009..cd63af114223 100644 --- a/dev-lang/python/python-3.1.1-r1.ebuild +++ b/dev-lang/python/python-3.1.1-r1.ebuild @@ -1,16 +1,11 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.1-r1.ebuild,v 1.22 2010/01/01 19:54:42 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.1-r1.ebuild,v 1.23 2010/01/10 17:18:59 arfrever Exp $ EAPI="2" inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs versionator -# We need this so that we don't depend on python.eclass. -PYVER_MAJOR="$(get_major_version)" -PYVER_MINOR="$(get_version_component_range 2)" -PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" - MY_P="Python-${PV}" S="${WORKDIR}/${MY_P}" @@ -51,6 +46,10 @@ PDEPEND="app-admin/python-updater PROVIDE="virtual/python" +pkg_setup() { + python_set_active_version ${SLOT} +} + src_prepare() { # Ensure that internal copies of expat and libffi aren't used. rm -fr Modules/expat @@ -206,7 +205,7 @@ src_test() { done elog "If you'd like to run them, you may:" - elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "cd $(python_get_libdir)/test" elog "and run the tests separately." python_disable_pyc @@ -215,29 +214,29 @@ src_test() { src_install() { emake DESTDIR="${D}" altinstall || die "emake altinstall failed" - mv "${D}usr/bin/python${PYVER}-config" "${D}usr/bin/python-config-${PYVER}" + mv "${D}usr/bin/python${SLOT}-config" "${D}usr/bin/python-config-${SLOT}" # Fix collisions between different slots of Python. - mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${PYVER}" - mv "${D}usr/bin/pydoc3" "${D}usr/bin/pydoc${PYVER}" - mv "${D}usr/bin/idle3" "${D}usr/bin/idle${PYVER}" + mv "${D}usr/bin/2to3" "${D}usr/bin/2to3-${SLOT}" + mv "${D}usr/bin/pydoc3" "${D}usr/bin/pydoc${SLOT}" + mv "${D}usr/bin/idle3" "${D}usr/bin/idle${SLOT}" rm -f "${D}usr/bin/smtpd.py" # Fix the OPT variable so that it doesn't have any flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}usr/$(get_libdir)/python${PYVER}/config/Makefile" + sed -e "s:^OPT=.*:OPT=-DNDEBUG:" -i "${D}$(python_get_libdir)/config/Makefile" if use build; then - rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{email,sqlite3,test,tkinter} + rm -fr "${D}$(python_get_libdir)/"{email,sqlite3,test,tkinter} else - use elibc_uclibc && rm -fr "${D}usr/$(get_libdir)/python${PYVER}/test" - use sqlite || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{tkinter,test/test_tk*} + use elibc_uclibc && rm -fr "${D}$(python_get_libdir)/test" + use sqlite || rm -fr "${D}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${D}$(python_get_libdir)/"{tkinter,test/test_tk*} fi - use threads || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/multiprocessing" + use threads || rm -fr "${D}$(python_get_libdir)/multiprocessing" - prep_ml_includes usr/include/python${PYVER} + prep_ml_includes $(python_get_includedir) if use examples; then insinto /usr/share/doc/${PF}/examples @@ -267,7 +266,7 @@ eselect_python_update() { pkg_postinst() { eselect_python_update - python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} + python_mod_optimize -x "(site-packages|test)" $(python_get_libdir) if [[ "$(eselect python show)" == "python2."* ]]; then ewarn @@ -297,5 +296,5 @@ pkg_postinst() { pkg_postrm() { eselect_python_update - python_mod_cleanup /usr/$(get_libdir)/python${PYVER} + python_mod_cleanup $(python_get_libdir) } |