diff options
author | 2010-01-01 18:56:30 +0000 | |
---|---|---|
committer | 2010-01-01 18:56:30 +0000 | |
commit | c1db8fda3a1a1a533b3e0239750c7541e120546e (patch) | |
tree | d62e13bba7174876c5dd5882d26dc4ebbe840949 /dev-lang | |
parent | fix quoting, caused by prefix stuff (diff) | |
download | historical-c1db8fda3a1a1a533b3e0239750c7541e120546e.tar.gz historical-c1db8fda3a1a1a533b3e0239750c7541e120546e.tar.bz2 historical-c1db8fda3a1a1a533b3e0239750c7541e120546e.zip |
Use external libffi (bug #209673). Respect PYTHONDONTWRITEBYTECODE in
distutils. Check availability of nis headers before building of nis
module (bug #288110).
Package-Manager: portage-15155-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lang/python/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/python/python-2.5.4-r4.ebuild | 310 |
3 files changed, 322 insertions, 2 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 55c2e4152d2e..60480930c270 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-lang/python # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.441 2010/01/01 17:23:45 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.442 2010/01/01 18:56:30 arfrever Exp $ + +*python-2.5.4-r4 (01 Jan 2010) + + 01 Jan 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + +python-2.5.4-r4.ebuild: + Use external libffi (bug #209673). Respect PYTHONDONTWRITEBYTECODE in + distutils. Check availability of nis headers before building of nis + module (bug #288110). 01 Jan 2010; Brent Baude <ranger@gentoo.org> python-2.6.4.ebuild: Marking python-2.6.4 ppc64 for bug 295066 diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index 8a0a98339e1e..b48e4a2c3b3c 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -13,6 +13,7 @@ DIST Python-2.6.4.tar.bz2 11249486 RMD160 fd33853842110fa3636dd296f2f27646fd2b15 DIST Python-3.1.1.tar.bz2 9757032 RMD160 d60b64e1346b2ff15d65b032ea35fb3ad8b0dc66 SHA1 42eb37bf75fae5731f6df1b195902960ae1789e0 SHA256 d87cc2578abade3ac1124b2b8e63146b1201726279d44cdde37fdd59553b51fd DIST python-gentoo-patches-2.4.6.tar.bz2 10983 RMD160 c06dc76edec86d708a0c0e37126ae50f49f61bd3 SHA1 bbc04083fe74cff8c723c5c3cab70b1b814c987f SHA256 0508a66408f218c655823303833599344d2edeec1ffc683c6ada3fc33731590d DIST python-gentoo-patches-2.5.4-r2.tar.bz2 20722 RMD160 86c25ad3647b7a3ca44c8e781a4572187d6c1934 SHA1 a859d75092303ee445cebd7af4221beeed58b74d SHA256 54236f25147bb26e15f6f204975513515410292a343b6dfb2116806aa9123afc +DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 RMD160 c3a807693103f9e26c3cce4add5a1f3d975ef216 SHA1 c6170894865ee8aac8c813916c21a0d0458691bc SHA256 03f5bdb0a4ac8eb498a90c5cd444a5c76ed7e79bff5e8dca00efe77cf80c6391 DIST python-gentoo-patches-2.6.2-r4.tar.bz2 11802 RMD160 d04d80d3ed2ead001dbdbe24a89e8cfe5e6e56c7 SHA1 eca475efb4dd47f688fa49d510ae8f53afe3dff0 SHA256 a0b881c332991aafd885a337432c9ef3c4a29d41ed50898e12261801aad6f83a DIST python-gentoo-patches-2.6.2-r5.tar.bz2 12206 RMD160 43f321ac4df2b4c6ccb5777d3627c089d46b9024 SHA1 2e35f77a7216b61a9aac9508eac2ddce882c993a SHA256 f3e1593911130ed4bb5879c13e5afa4edd0a873682e1e8609184ec24cae244e1 DIST python-gentoo-patches-2.6.3.tar.bz2 10996 RMD160 6247c60c54dc80f4a243e5fd2cb56e91989b1703 SHA1 066d76528e892b588d4b643ab4e7e310f2e0079e SHA256 d116be09c88ecd8b93b1f1cfa5a18100e1aeb21ca515a8425e3e14ce6b3e5554 @@ -20,10 +21,11 @@ DIST python-gentoo-patches-2.6.4.tar.bz2 11032 RMD160 83903892ef18880f876e7a140c DIST python-gentoo-patches-3.1.1-r3.tar.bz2 8874 RMD160 06058325dec089258b5e61510c1c2e2369a26f3e SHA1 5ad63e6eb12842b31bc701d9d115669f7fbc79b2 SHA256 3be52f704a6eccfd1d6b889651420f3a04f85d09f910410f5ea93c6b4d776c68 EBUILD python-2.4.6.ebuild 9262 RMD160 6df7665c69b47b35b70791373dee58f6acbc2a92 SHA1 81a265d7f478487e484335a9e79b966a33d0256f SHA256 23ce2b95a5f876192326f508969e69845eaf53a0cbd1176c978c0f0e7f5719d3 EBUILD python-2.5.4-r3.ebuild 9457 RMD160 76b23268635520077fdb652833a49c8dbd17b7e3 SHA1 9e5260a15056bd381424696ad291850cf75645be SHA256 1449dbd53a020cc2844c2eaf39004fd220f702e395c35a2a287738c86c1a4cc5 +EBUILD python-2.5.4-r4.ebuild 9713 RMD160 3cd0bbb022493d5bd04789c5724155e642d35d12 SHA1 c60627163f1d94c520c4df4e128b3324d2f1ce52 SHA256 bede02b61cf3bec09e2607693821249e30017c33574cef5907f888283e4d73d8 EBUILD python-2.6.2-r1.ebuild 10010 RMD160 932616944b96b6797b9167d324f7122504d457bd SHA1 81d45fa8f5cc68b2d547ef0151553c66d673dfcf SHA256 ae0d672108d40306b12c94fe20b38c6a51a201798c217fefa7f34883a374267c EBUILD python-2.6.2-r2.ebuild 10045 RMD160 778904d8332b14b68872ce36367c6440f4004b4a SHA1 357cf9cbbd882219ae3e136f93c467c0b210bf51 SHA256 400ef0f1d9c43aca04d10243fe60f5a3bf1e1f533c2579a4f770ca5291214f11 EBUILD python-2.6.3.ebuild 9983 RMD160 af38972ec604b2ee906c1c05640e20a5399165d5 SHA1 bbdeb0b02516174c2250f4eb49e7e272e657c489 SHA256 f2bc2a6471f750779e41f4c77011f5d218d9a6bbb5abc729750f37b0a08f0ad3 EBUILD python-2.6.4.ebuild 9955 RMD160 f097082baf7f1f9f7f274551eacf4ef0fbb948a3 SHA1 396c2b57f2ed222b161f8eb4a2fff582af18f235 SHA256 8577d0546288b4d07a456ffd32ed62c06cd34d9fde1b4f97fd4e68898ed6df88 EBUILD python-3.1.1-r1.ebuild 9289 RMD160 352c9ab262d22eef137fc758ee617426ee92deda SHA1 9ef1364783d951c0e44e0f739fb3ceb84f2686e4 SHA256 8fb089a6e57476c3bc1526a4e441f205e3340f42099d2cb216664894257caa3d -MISC ChangeLog 76875 RMD160 b67f3b7928eec49a9ace85124cb05113b6d5fd6e SHA1 b5e7ac89ba0ac60fbd6c414a8bea26d0928a8f5e SHA256 9dd5de3abb6f3aca5389175714c4206c3ee651bbbcff80a5d8fce9f98cdbf5e1 +MISC ChangeLog 77176 RMD160 5ccbb4555c81eebcb0cfb22a1b320e80352490d5 SHA1 ba0ef46dc531583bb50c1b8c38006b26d44e5eab SHA256 5e9a48ca9b94ac828048041b76316bd40760ff7d4c0216eaebbd8ebc629e19e0 MISC metadata.xml 661 RMD160 54831d16b8807086bfabdbb3df9d33336b5d42a0 SHA1 9867c337fe9e6f4e967004fc9409763e0fedf43b SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908 diff --git a/dev-lang/python/python-2.5.4-r4.ebuild b/dev-lang/python/python-2.5.4-r4.ebuild new file mode 100644 index 000000000000..47a946c91153 --- /dev/null +++ b/dev-lang/python/python-2.5.4-r4.ebuild @@ -0,0 +1,310 @@ +# 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-2.5.4-r4.ebuild,v 1.1 2010/01/01 18:56:30 arfrever Exp $ + +EAPI="1" + +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}" + +PATCHSET_REVISION="3" + +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}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" + +LICENSE="PSF-2.2" +SLOT="2.5" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite ssl +threads tk +wide-unicode wininst +xml" + +# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes} +# do not conflict with the ones in python proper. - liquidx + +RDEPEND=">=app-admin/eselect-python-20090606 + >=sys-libs/zlib-1.1.3 + virtual/libffi + virtual/libintl + !build? ( + berkdb? ( || ( + sys-libs/db:4.5 + sys-libs/db:4.4 + sys-libs/db:4.3 + sys-libs/db:4.2 + ) ) + doc? ( dev-python/python-docs:${SLOT} ) + gdbm? ( sys-libs/gdbm ) + ncurses? ( + >=sys-libs/ncurses-5.2 + readline? ( >=sys-libs/readline-4.1 ) + ) + sqlite? ( >=dev-db/sqlite-3 ) + ssl? ( dev-libs/openssl ) + tk? ( >=dev-lang/tk-8.0 ) + xml? ( >=dev-libs/expat-2 ) + )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" +RDEPEND+=" !build? ( app-misc/mime-types )" +PDEPEND="app-admin/python-updater" + +PROVIDE="virtual/python" + +pkg_setup() { + if use berkdb; then + ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" + ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" + ewarn "module provided by dev-python/bsddb3 which supports both Python 2 and Python 3." + fi + + if ! has_version "=dev-lang/python-3*"; then + elog "It is highly recommended to additionally install Python 3, but without configuring Python wrapper to use Python 3." + fi + + if built_with_use sys-devel/gcc libffi; then + die "Reinstall sys-devel/gcc with \"libffi\" USE flag disabled" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Ensure that internal copies of expat and libffi aren't used. + rm -fr Modules/expat + rm -fr Modules/_ctypes/libffi* + + if tc-is-cross-compiler; then + epatch "${FILESDIR}/python-2.5-cross-printf.patch" + else + rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch + fi + + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" + + sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ + Lib/distutils/command/install.py \ + Lib/distutils/sysconfig.py \ + Lib/site.py \ + Makefile.pre.in \ + Modules/Setup.dist \ + 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) + # PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!! + [[ "${ARCH}" == "hppa" ]] && sed -e "s/utimes //" -i "${S}/configure" + + if ! use wininst; then + # Remove Microsoft Windows executables. + rm Lib/distutils/command/wininst-*.exe + fi + + eautoreconf +} + +src_configure() { + # Disable extraneous modules with extra dependencies. + if use build; then + export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter pyexpat" + export PYTHON_DISABLE_SSL="1" + else + # dbm module can be linked against berkdb or gdbm. + # Defaults to gdbm when both are enabled, #204343. + local disable + use berkdb || use gdbm || disable+=" dbm" + use berkdb || disable+=" _bsddb" + use gdbm || disable+=" gdbm" + use ncurses || disable+=" _curses _curses_panel" + use readline || disable+=" readline" + use sqlite || disable+=" _sqlite3" + use ssl || export PYTHON_DISABLE_SSL="1" + use tk || disable+=" _tkinter" + use xml || disable+=" pyexpat" + export PYTHON_DISABLE_MODULES="${disable}" + + 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." + fi + fi + + if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then + einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" + fi + + export OPT="${CFLAGS}" + + filter-flags -malign-double + + [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC + + # https://bugs.gentoo.org/show_bug.cgi?id=50309 + if is-flag -O3; then + is-flag -fstack-protector-all && replace-flags -O3 -O2 + use hardened && replace-flags -O3 -O2 + fi + + 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" + mv python hostpython + mv Parser/pgen Parser/hostpgen + make distclean + sed -i \ + -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. + tc-export CXX + + # Set LDFLAGS so we link modules with -lpython2.5 correctly. + # Needed on FreeBSD unless Python 2.5 is already installed. + # Please query BSD team before removing this! + append-ldflags "-L." + + econf \ + --with-fpectl \ + --enable-shared \ + $(use_enable ipv6) \ + $(use_with threads) \ + $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + --with-libc='' \ + --with-system-ffi +} + +src_compile() { + src_configure + emake || die "emake failed" +} + +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 mimetools minidom mmap posix pyexpat sax strptime subprocess syntax tcl time urllib urllib2 xml_etree" + + # test_ctypes fails with PAX kernel (bug #234498). + host-is-pax && skip_tests+=" ctypes" + + 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 "The following tests have been skipped:" + 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." + + python_disable_pyc +} + +src_install() { + emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" + + mv "${D}usr/bin/python${PYVER}-config" "${D}usr/bin/python-config-${PYVER}" + + # Fix collisions between different slots of Python. + 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 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" + + if use build; then + rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,email,lib-tk,sqlite3,test} + else + use elibc_uclibc && rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb/test,test} + use berkdb || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{bsddb,test/test_bsddb*} + use sqlite || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/"{sqlite3,test/test_sqlite*} + use tk || rm -fr "${D}usr/$(get_libdir)/python${PYVER}/lib-tk" + fi + + prep_ml_includes usr/include/python${PYVER} + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r "${S}/Tools" || die "doins failed" + fi + + newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then + python_updater_warning="1" + fi +} + +eselect_python_update() { + local ignored_python_slots_options= + [[ "$(eselect python show)" == "python2."* ]] && ignored_python_slots_options="--ignore 3.0 --ignore 3.1 --ignore 3.2" + + # Create python2 symlink. + eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 > /dev/null + + eselect python update ${ignored_python_slots_options} +} + +pkg_postinst() { + eselect_python_update + + python_mod_optimize -x "(site-packages|test)" /usr/$(get_libdir)/python${PYVER} + + if [[ "${python_updater_warning}" == "1" ]]; then + ewarn + ewarn "\e[1;31m************************************************************************\e[0m" + ewarn + ewarn "You have just upgraded from an older version of Python." + ewarn "You should run 'python-updater \${options}' to rebuild Python modules." + ewarn + ewarn "\e[1;31m************************************************************************\e[0m" + ewarn + ebeep 12 + fi +} + +pkg_postrm() { + eselect_python_update + + python_mod_cleanup /usr/$(get_libdir)/python${PYVER} +} |