diff options
author | Maksim 'max_posedon' Melnikau <maxposedon@gmail.com> | 2009-05-29 21:36:14 +0000 |
---|---|---|
committer | Maksim 'max_posedon' Melnikau <maxposedon@gmail.com> | 2009-05-29 21:36:14 +0000 |
commit | 88e7c341ed52aac0009607810883ce451b7c2e08 (patch) | |
tree | f1834602feddae31724c4cfb50cf0fccb56de21f /dev-lang | |
parent | remove keywords from tslib-9999 (diff) | |
download | embedded-cross-88e7c341ed52aac0009607810883ce451b7c2e08.tar.gz embedded-cross-88e7c341ed52aac0009607810883ce451b7c2e08.tar.bz2 embedded-cross-88e7c341ed52aac0009607810883ce451b7c2e08.zip |
keep python-2.6 in sync with portage
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/python/python-2.6.2-r1.ebuild (renamed from dev-lang/python/python-2.6.2.ebuild) | 191 |
2 files changed, 93 insertions, 102 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 93be084..07353b6 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -25,7 +25,7 @@ DIST Python-2.5.4.tar.bz2 9821313 RMD160 3a76c83464c3b1c38a60351ab054e33ac719566 DIST Python-2.6.2.tar.bz2 11156901 RMD160 85fa3540cbacf4d0547d2381eb3aa76bef35c2e1 SHA1 125d4ed90f82de1d44f288150bbbda23a6cd27a4 SHA256 a1cdc4a8f6c1f947ea3b87d097af2db4371019bac941d92c3844124c5694328b DIST python-gentoo-patches-2.5.2-r8.tar.bz2 28376 RMD160 c4e02a5ed947b253781ec11fd9f5f26498e41c81 SHA1 92e359402e7b6751b28671e19ad7ea0736b62614 SHA256 c008abb01c40057facf3d7fa8ad3a31e792f1b7d41bba96e0084e7476e05a0e3 DIST python-gentoo-patches-2.5.4.tar.bz2 19474 RMD160 00bb0918414db251b11b7f19a9f8a112c9e49fbd SHA1 fd4955f7da3049abecc4df0e203e783a90390cf8 SHA256 6e050dd8e8a90655bf935af99ad1ae6456bc072f075ddb9bcd532201bbb37274 -DIST python-gentoo-patches-2.6.2.tar.bz2 8848 RMD160 e3cf700fd8966a6bd6e3e4b64534b72e56863819 SHA1 e073af86f27db77d2eb396ff78814f2b8920811b SHA256 9178be1a77893dc2c74e40073095bbc560d02e5456f1e6be6da20930470950f7 +DIST python-gentoo-patches-2.6.2-r1.tar.bz2 9706 RMD160 8868231a1759cfeb4497c409f4aaf71329c1675f SHA1 0c48800969cf50fa93fc2657f5106d332b9d4c05 SHA256 13b40e4f9ef89b7440606d437daed8617c39219e73aa3605c5157e0f09c703df EBUILD python-2.5.2-r8.ebuild 11754 RMD160 d4e4075b19c01ed5d510ff1fe24a12affce313b6 SHA1 2f59b7473032c9de41dc38de2e78bc907433c42e SHA256 7796ccdf02c99e0ed1bb8e267d0ed82c8b95aa20de51bf0357526c4175cccbc2 EBUILD python-2.5.4-r2.ebuild 11452 RMD160 b3648dd03902f41b799f7f05ded01ad262fdec59 SHA1 ae9d244bad2ad1aa21f77abdc228269c68a1385e SHA256 6d282dc4524fe31ece6beaadab123021cfd7b1b4a275f01423c4e70b228921e4 -EBUILD python-2.6.2.ebuild 9354 RMD160 e9b86f0c65294739bb379a3fc508d36dacd23f80 SHA1 494e495446c6d6255906af3455bb557cb9d83141 SHA256 efe3f0ec0c3c699fe1f258750281883d55624890b0929366667cd0baae763be3 +EBUILD python-2.6.2-r1.ebuild 9374 RMD160 e2b6b466ff8cfa363d5af68aadd9189daa9bdbfd SHA1 3d207025be7d8ad30f548a351a695dbec641b227 SHA256 cce9f301cae10a0c8e6ce29a9161f3c72b0cf91d372dfbb18006d28ccbde9b8f diff --git a/dev-lang/python/python-2.6.2.ebuild b/dev-lang/python/python-2.6.2-r1.ebuild index 751f890..8460483 100644 --- a/dev-lang/python/python-2.6.2.ebuild +++ b/dev-lang/python/python-2.6.2-r1.ebuild @@ -1,17 +1,17 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.2.ebuild,v 1.1 2009/04/18 19:57:15 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.2-r1.ebuild,v 1.1 2009/05/28 16:59:24 arfrever Exp $ # NOTE about python-portage interactions : # - Do not add a pkg_setup() check for a certain version of portage # in dev-lang/python. It _WILL_ stop people installing from # Gentoo 1.4 images. -EAPI=2 +EAPI="2" -inherit eutils autotools flag-o-matic python versionator toolchain-funcs libtool +inherit autotools eutils flag-o-matic libtool multilib python toolchain-funcs versionator -# we need this so that we don't depends on python.eclass +# We need this so that we don't depends on python.eclass PYVER_MAJOR=$(get_major_version) PYVER_MINOR=$(get_version_component_range 2) PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" @@ -22,7 +22,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-2.6.2.tar.bz2" + mirror://gentoo/python-gentoo-patches-${PV}-r1.tar.bz2" LICENSE="PSF-2.2" SLOT="2.6" @@ -33,30 +33,25 @@ IUSE="berkdb build doc elibc_uclibc examples gdbm ipv6 ncurses readline sqlite s # do not conflict with the ones in python proper. - liquidx DEPEND=">=app-admin/eselect-python-20080925 - >=sys-libs/zlib-1.1.3 - !build? ( - sqlite? ( >=dev-db/sqlite-3 ) - tk? ( >=dev-lang/tk-8.0 ) - ncurses? ( >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) ) - berkdb? ( >=sys-libs/db-3.1 ) - gdbm? ( sys-libs/gdbm ) - ssl? ( dev-libs/openssl ) - doc? ( dev-python/python-docs:2.6 ) - xml? ( dev-libs/expat ) + >=sys-libs/zlib-1.1.3 + !build? ( + sqlite? ( >=dev-db/sqlite-3 ) + tk? ( >=dev-lang/tk-8.0 ) + ncurses? ( >=sys-libs/ncurses-5.2 + readline? ( >=sys-libs/readline-4.1 ) ) + berkdb? ( >=sys-libs/db-3.1 ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + doc? ( dev-python/python-docs:${SLOT} ) + xml? ( dev-libs/expat ) )" RDEPEND="${DEPEND}" - -# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri -# NOTE: added blocker to enforce correct merge order for bug 88777. - zmedico - PDEPEND="${DEPEND} app-admin/python-updater" + PROVIDE="virtual/python" src_prepare() { - default - - if tc-is-cross-compiler ; then + if tc-is-cross-compiler; then epatch "${FILESDIR}"/python-2.5-cross-printf.patch epatch "${FILESDIR}"/python-2.6-chflags-cross.patch epatch "${FILESDIR}"/python-2.6-test-cross.patch @@ -89,12 +84,12 @@ src_prepare() { 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 + [[ "${ARCH}" == "hppa" ]] && sed -e "s/utimes //" -i "${S}/configure" if ! use wininst; then - # remove microsoft windows executables + # Remove Microsoft Windows executables. rm Lib/distutils/command/wininst-*.exe fi @@ -102,13 +97,13 @@ src_prepare() { } src_configure() { - # disable extraneous modules with extra dependencies + # Disable extraneous modules with extra dependencies. if use build; then export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter _sqlite3" export PYTHON_DISABLE_SSL=1 else # dbm module can link to berkdb or gdbm - # defaults to gdbm when both are enabled, #204343 + # Defaults to gdbm when both are enabled, #204343 local disable use berkdb || use gdbm || disable="${disable} dbm" use berkdb || disable="${disable} bsddb" @@ -122,7 +117,7 @@ src_configure() { export PYTHON_DISABLE_MODULES="${disable}" fi - if use !xml; then + if ! use xml; then ewarn "You have configured Python without XML support." ewarn "This is NOT a recommended configuration as you" ewarn "may face problems parsing any XML documents." @@ -134,8 +129,8 @@ src_configure() { local myconf - # super-secret switch. don't use this unless you know what you're - # doing. enabling UCS2 support will break your existing python + # Super-secret switch. Don't use this unless you know what you're + # doing. Enabling UCS2 support will break your existing python # modules use ucs2 \ && myconf="${myconf} --enable-unicode=ucs2" \ @@ -143,9 +138,7 @@ src_configure() { filter-flags -malign-double - # Seems to no longer be necessary - #[ "${ARCH}" = "amd64" ] && append-flags -fPIC - [ "${ARCH}" = "alpha" ] && append-flags -fPIC + [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC # http://bugs.gentoo.org/show_bug.cgi?id=50309 if is-flag -O3; then @@ -153,7 +146,7 @@ src_configure() { use hardened && replace-flags -O3 -O2 fi - if tc-is-cross-compiler ; then + if tc-is-cross-compiler; then OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ ./configure --{build,host}=${CBUILD} || die "cross-configure failed" emake python Parser/pgen || die "cross-make failed" @@ -165,16 +158,16 @@ src_configure() { cp -v /usr/lib/python2.6/lib-dynload/time.so Modules/. cp -v /usr/lib/python2.6/lib-dynload/math.so Modules/. sed -i \ - -e '/^HOSTPYTHON/s:=.*:=./hostpython:' \ - -e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \ + -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ + -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ 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.6 correctly. - # Needed on FreeBSD unless python2.6 is already installed. + # Set LDFLAGS so we link modules with -lpython2.6 correctly. + # Needed on FreeBSD unless Python 2.6 is already installed. # Please query BSD team before removing this! append-ldflags "-L." @@ -189,36 +182,74 @@ src_configure() { ${myconf} } +src_test() { + # Tests won't work when cross compiling. + if tc-is-cross-compiler; then + elog "Disabling tests due to crosscompiling." + return + fi + + # 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) + local skip_tests="distutils global httpservers mimetools minidom mmap posix pyexpat sax strptime subprocess syntax tcl time urllib urllib2 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 + 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). + EXTRATESTOPTS="-w" make test < /dev/tty || die "make test failed" + + 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 + elog "test_${test}.py" + done + + elog "If you'd like to run them, you may:" + elog "cd /usr/$(get_libdir)/python${PYVER}/test" + elog "and run the tests separately." +} + src_install() { - dodir /usr - emake DESTDIR="${D}" altinstall maninstall || die + emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" mv "${D}"/usr/bin/python${PYVER}-config "${D}"/usr/bin/python-config-${PYVER} - # Fix slotted collisions + # Fix slotted collisions. mv "${D}"/usr/bin/2to3 "${D}"/usr/bin/2to3-${PYVER} 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 + 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 flags listed in it. # Prevents the problem with compiling things with conflicting flags later. - dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' \ - /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 -rf "${D}"/usr/$(get_libdir)/python${PYVER}/{test,bsddb/test} - use berkdb || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/bsddb - use tk || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/lib-tk + 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 + use tk || rm -fr "${D}"/usr/$(get_libdir)/python${PYVER}/lib-tk fi 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 @@ -231,55 +262,15 @@ src_install() { } pkg_postrm() { - eselect python update --ignore 3.0 - python_mod_cleanup /usr/$(get_libdir)/python${PYVER} -} - -pkg_postinst() { - eselect python update --ignore 3.0 - python_version + eselect python update --ignore 3.0 --ignore 3.1 - python_mod_optimize -x "(site-packages|test)" \ - /usr/$(get_libdir)/python${PYVER} + python_mod_cleanup /usr/lib/python${PYVER} + [[ "$(get_libdir)" != "lib" ]] && python_mod_cleanup /usr/$(get_libdir)/python${PYVER} } -src_test() { - # Tests won't work when cross compiling - if tc-is-cross-compiler ; then - elog "Disabling tests due to crosscompiling." - return - fi - - # 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) - local skip_tests="distutils global httpservers mimetools minidom mmap posix pyexpat sax strptime subprocess syntax tcl time urllib urllib2 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 - 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) - EXTRATESTOPTS="-w" make test < /dev/tty || die "make test failed" - - 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 - elog "test_${test}.py" - done +pkg_postinst() { + eselect python update --ignore 3.0 --ignore 3.1 - elog "If you'd like to run them, you may:" - elog "cd /usr/lib/python${PYVER}/test" - elog "and run the tests separately." + 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} } |