diff options
Diffstat (limited to 'dev-lang/python/python-2.5.4-r3.ebuild')
-rw-r--r-- | dev-lang/python/python-2.5.4-r3.ebuild | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/dev-lang/python/python-2.5.4-r3.ebuild b/dev-lang/python/python-2.5.4-r3.ebuild index 79a72724f..c7808592e 100644 --- a/dev-lang/python/python-2.5.4-r3.ebuild +++ b/dev-lang/python/python-2.5.4-r3.ebuild @@ -24,7 +24,7 @@ S="${WORKDIR}/${MY_P}" DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." HOMEPAGE="http://www.python.org/" SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2 - mirror://gentoo/python-gentoo-patches-${PV}-r1.tar.bz2" + mirror://gentoo/python-gentoo-patches-${PV}-r1.tar.bz2" LICENSE="PSF-2.2" SLOT="2.5" @@ -48,7 +48,6 @@ DEPEND=">=app-admin/eselect-python-20080925 doc? ( dev-python/python-docs:${SLOT} ) xml? ( dev-libs/expat[lib32?] ) )" - RDEPEND="${DEPEND}" PDEPEND="${DEPEND} app-admin/python-updater" @@ -63,8 +62,6 @@ multilib-native_src_prepare_internal() { rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch fi - epatch "${FILESDIR}"/${P}-distutils-multilib.patch - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ @@ -76,7 +73,7 @@ multilib-native_src_prepare_internal() { Modules/getpath.c \ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - # fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04) + # Fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04) # PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!! [[ "${ARCH}" == "hppa" ]] && sed -e "s/utimes //" -i "${S}/configure" @@ -151,7 +148,7 @@ multilib-native_src_configure_internal() { Makefile.pre.in || die "sed failed" fi - # Export CXX so it ends up in /usr/lib/python2.x/config/Makefile. + # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. tc-export CXX # Set LDFLAGS so we link modules with -lpython2.5 correctly. @@ -175,38 +172,39 @@ multilib-native_src_compile_internal() { emake || die "emake failed" } -src_test() { - # Tests won't work when cross compiling - if tc-is-cross-compiler ; then +multilib-native_src_test_internal() { + # Tests won't work when cross compiling. + if tc-is-cross-compiler; then elog "Disabling tests due to crosscompiling." return fi - # Disabling byte compiling breaks test_import + # Byte compiling should be enabled here. + # Otherwise test_import fails. python_enable_pyc - #Skip all tests that fail during emerge but pass without emerge: - #(See bug# 67970) + # Skip all tests that fail during emerge but pass without emerge: + # (See bug #67970) local skip_tests="distutils global mimetools minidom mmap posix pyexpat sax strptime subprocess syntax tcl time urllib urllib2 webbrowser xml_etree" # test_pow fails on alpha. # http://bugs.python.org/issue756093 [[ ${ARCH} == "alpha" ]] && skip_tests="${skip_tests} pow" - for test in ${skip_tests} ; do + for test in ${skip_tests}; do mv "${S}"/Lib/test/test_${test}.py "${T}" done # Redirect stdin from /dev/tty as a workaround for bug #248081. - # rerun failed tests in verbose mode (regrtest -w) + # Rerun failed tests in verbose mode (regrtest -w). EXTRATESTOPTS="-w" make test < /dev/tty || die "make test failed" - for test in ${skip_tests} ; do + for test in ${skip_tests}; do mv "${T}"/test_${test}.py "${S}"/Lib/test/test_${test}.py done elog "Portage skipped the following tests which aren't able to run from emerge:" - for test in ${skip_tests} ; do + for test in ${skip_tests}; do elog "test_${test}.py" done @@ -223,18 +221,18 @@ multilib-native_src_install_internal() { mv "${D}"/usr/bin/python${PYVER} "${D}"/usr/bin/python${PYVER}-${ABI} fi - # Fix slotted collisions + # Fix slotted collisions. mv "${D}"/usr/bin/pydoc "${D}"/usr/bin/pydoc${PYVER} mv "${D}"/usr/bin/idle "${D}"/usr/bin/idle${PYVER} mv "${D}"/usr/share/man/man1/python.1 "${D}"/usr/share/man/man1/python${PYVER}.1 rm -f "${D}"/usr/bin/smtpd.py - # Fix the OPT variable so that it doesn't have any opts listed in it. + # 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}usr/$(get_libdir)/python${PYVER}/config/Makefile" - if use build ; then - rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test} + if use build; then + rm -fr "${D}"/usr/$(get_libdir)/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test} else use elibc_uclibc && rm -fr "${D}"/usr/$(get_libdir)/python${PYVER}/{test,bsddb/test} use berkdb || rm -fr "${D}"/usr/$(get_libdir)/python${PYVER}/bsddb @@ -243,7 +241,7 @@ multilib-native_src_install_internal() { prep_ml_includes usr/include/python${PYVER} - if use examples ; then + if use examples; then insinto /usr/share/doc/${PF}/examples doins -r "${S}"/Tools || die "doins failed" fi @@ -253,17 +251,15 @@ multilib-native_src_install_internal() { } pkg_postrm() { - eselect python update --ignore 3.0 + eselect python update --ignore 3.0 --ignore 3.1 python_mod_cleanup /usr/lib/python${PYVER} [[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER} } pkg_postinst() { - eselect python update --ignore 3.0 + eselect python update --ignore 3.0 --ignore 3.1 python_mod_optimize -x "(site-packages|test)" /usr/lib/python${PYVER} [[ "$(get_libdir)" != "lib" ]] && python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} } - - |