summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven J Newbury <steve@snewbury.org.uk>2009-04-07 21:46:34 +0100
committerSteven J Newbury <steve@snewbury.org.uk>2009-04-07 21:46:34 +0100
commit5774f12bb8d5dcf328d36fe8bac042558750bb38 (patch)
tree3f15ec30911550d0d9e3d3fd3e51216ef34f608f /dev-lang
parentFurther python cleanups (diff)
downloadmultilib-portage-5774f12bb8d5dcf328d36fe8bac042558750bb38.tar.gz
multilib-portage-5774f12bb8d5dcf328d36fe8bac042558750bb38.tar.bz2
multilib-portage-5774f12bb8d5dcf328d36fe8bac042558750bb38.zip
Cleaned up dev-lang/python-2.5.2-r7
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/python/Manifest2
-rw-r--r--dev-lang/python/python-2.5.2-r7.ebuild108
2 files changed, 77 insertions, 33 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 92b4df258..3667286b4 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -19,6 +19,6 @@ DIST Python-2.6.1.tar.bz2 10960385 RMD160 497dafaca9c150fca611b0175eeb13c2fc4d3e
DIST python-gentoo-patches-2.5.2-r7.tar.bz2 28160 RMD160 c2a8c71f464f1cf0cd8e3d142a3f3454de46bc55 SHA1 b64fc90f331e42ea2c364fd61d13b515300fdcbf SHA256 8afff4ed12c3c5ca4418da657617317a8c646a69ae341a3d494747659825355f
DIST python-gentoo-patches-2.5.4.tar.bz2 19474 RMD160 00bb0918414db251b11b7f19a9f8a112c9e49fbd SHA1 fd4955f7da3049abecc4df0e203e783a90390cf8 SHA256 6e050dd8e8a90655bf935af99ad1ae6456bc072f075ddb9bcd532201bbb37274
DIST python-gentoo-patches-2.6-r5.tar.bz2 7431 RMD160 dbfc0715773446614843b45818d4152ca133140a SHA1 495cbfbf333052faf6860cf2d682f249a787557c SHA256 ef81eac97d933c77afcfd2434f44132717cd0a1550d1092e388e3c2f3dd5f3cf
-EBUILD python-2.5.2-r7.ebuild 9125 RMD160 aec8cd3b33f589ca4fa067778cc8f9506d9f795b SHA1 68e99c703dfe2e29d5707e6b732df37ff23b9e3a SHA256 3bd498dc2531801f2aed47cd880ede34d13a80d7df7cd33142ca4e0cf4c98097
+EBUILD python-2.5.2-r7.ebuild 10730 RMD160 93627852adbd2e41c4e5342840ca2b49f2a98405 SHA1 2eb26b8b69f62d5d981c79f6ea7e3a79b7884741 SHA256 986687608226bff47761fb44210e158a83badff0a856fbf89cdb360e0b846e35
EBUILD python-2.5.4-r2.ebuild 10735 RMD160 91b456d330849cdd7ed6512a43f5a4473479ac1a SHA1 a794d8e2aa195310eac7820da49ed9fbe07fcd00 SHA256 c72a22cd612f9f83ad9c6e83f26efab87d70347b5f37749c7c52321b2444deed
EBUILD python-2.6.1-r1.ebuild 9209 RMD160 466694abd36d1ba29f82bd2902fb402aa35705f4 SHA1 a8d79f68b6ed8516a1f06e35330f368901b44dfe SHA256 ac26547932f5eb1945094894b3fd2833304b7b313338f2326e9efe6462b9cf1a
diff --git a/dev-lang/python/python-2.5.2-r7.ebuild b/dev-lang/python/python-2.5.2-r7.ebuild
index 8cd0d9d77..77a438408 100644
--- a/dev-lang/python/python-2.5.2-r7.ebuild
+++ b/dev-lang/python/python-2.5.2-r7.ebuild
@@ -1,6 +1,6 @@
# 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.1-r1.ebuild,v 1.2 2009/03/26 05:10:31 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.2-r7.ebuild,v 1.15 2009/03/26 05:10:31 zmedico Exp $
# NOTE about python-portage interactions :
# - Do not add a pkg_setup() check for a certain version of portage
@@ -34,17 +34,17 @@ IUSE="ncurses gdbm ssl readline tk berkdb ipv6 build ucs2 sqlite doc +threads ex
# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes,cjkcodecs}
# do not conflict with the ones in python proper. - liquidx
-DEPEND=">=app-admin/eselect-python-20080925
- >=sys-libs/zlib-1.1.3[lib32?]
+DEPEND=">=sys-libs/zlib-1.1.3
!build? (
sqlite? ( >=dev-db/sqlite-3[lib32?] )
tk? ( >=dev-lang/tk-8.0[lib32?] )
ncurses? ( >=sys-libs/ncurses-5.2[lib32?]
readline? ( >=sys-libs/readline-4.1[lib32?] ) )
- berkdb? ( >=sys-libs/db-3.1[lib32?] )
+ berkdb? ( || ( sys-libs/db:4.5[lib32?] sys-libs/db:4.4[lib32?] sys-libs/db:4.3[lib32?]
+ sys-libs/db:4.2[lib32?] ) )
gdbm? ( sys-libs/gdbm[lib32?] )
ssl? ( dev-libs/openssl[lib32?] )
- doc? ( dev-python/python-docs:2.6 )
+ doc? ( dev-python/python-docs:2.5 )
xml? ( dev-libs/expat[lib32?] )
)"
@@ -57,15 +57,14 @@ PROVIDE="virtual/python"
multilib-native_src_prepare_internal() {
default
- if tc-is-cross-compiler ; then
- epatch "${FILESDIR}"/python-2.4.4-test-cross.patch \
- "${FILESDIR}"/python-2.5-cross-printf.patch
- else
+ if tc-is-cross-compiler ; then
+ epatch "${FILESDIR}"/python-2.4.4-test-cross.patch \
+ "${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 \
@@ -73,7 +72,7 @@ multilib-native_src_prepare_internal() {
Makefile.pre.in \
Modules/Setup.dist \
Modules/getpath.c \
- setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+ setup.py || die
# 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 !!!
@@ -98,13 +97,13 @@ multilib-native_src_configure_internal() {
local disable
use berkdb || use gdbm || disable="${disable} dbm"
use berkdb || disable="${disable} bsddb"
- use xml || disable="${disable} pyexpat"
use gdbm || disable="${disable} gdbm"
use ncurses || disable="${disable} _curses _curses_panel"
use readline || disable="${disable} readline"
use sqlite || disable="${disable} _sqlite3"
use ssl || export PYTHON_DISABLE_SSL=1
use tk || disable="${disable} _tkinter"
+ use xml || disable="${disable} pyexpat"
export PYTHON_DISABLE_MODULES="${disable}"
fi
@@ -141,7 +140,7 @@ multilib-native_src_configure_internal() {
if tc-is-cross-compiler ; then
OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \
- ./configure || die "cross-configure failed"
+ ./configure --{build,host}=${CBUILD} || die "cross-configure failed"
emake python Parser/pgen || die "cross-make failed"
mv python hostpython
mv Parser/pgen Parser/hostpgen
@@ -149,7 +148,7 @@ multilib-native_src_configure_internal() {
sed -i \
-e '/^HOSTPYTHON/s:=.*:=./hostpython:' \
-e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \
- Makefile.pre.in || die "sed failed"
+ Makefile.pre.in || die
fi
# export CXX so it ends up in /usr/lib/python2.x/config/Makefile
@@ -168,7 +167,7 @@ multilib-native_src_configure_internal() {
--infodir='${prefix}'/share/info \
--mandir='${prefix}'/share/man \
--with-libc='' \
- ${myconf}
+ ${myconf} || die
}
multilib-native_src_install_internal() {
@@ -176,12 +175,11 @@ multilib-native_src_install_internal() {
emake DESTDIR="${D}" altinstall maninstall || die
mv "${D}"/usr/bin/python${PYVER}-config "${D}"/usr/bin/python-config-${PYVER}
- if [[ $(number_abis) -gt 1 ]] && ! is_final_abi; then
+ if [[ $(number_abis) -gt 1 ]] && ! is_final_abi; then
mv "${D}"/usr/bin/python${PYVER} "${D}"/usr/bin/python${PYVER}-${ABI}
fi
# 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 \
@@ -213,28 +211,75 @@ multilib-native_src_install_internal() {
doins "${S}"/Makefile.pre.in
if use examples ; then
- insinto /usr/share/doc/${PF}/examples
- doins -r "${S}"/Tools || die "doins failed"
+ mkdir -p "${D}"/usr/share/doc/${P}/examples
+ cp -r "${S}"/Tools "${D}"/usr/share/doc/${P}/examples
fi
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
-
- # Installs empty directory.
- rmdir "${D}"/usr/$(get_libdir)/${PN}${PV}/lib-old
}
-multilib-native_pkg_postrm_internal() {
- eselect python update --ignore 3.0
- python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
+pkg_postrm() {
+ local mansuffix=$(ecompress --suffix)
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ python_mod_cleanup /usr/lib/python${PYVER}
+ [[ "$(get_libdir)" == "lib" ]] || \
+ python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
}
-multilib-native_pkg_postinst_internal() {
- eselect python update --ignore 3.0
- python_version
+pkg_postinst() {
+ local myroot
+ myroot=$(echo $ROOT | sed 's:/$::')
+ local mansuffix=$(ecompress --suffix)
+
+ python_makesym
+ alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/bin/python-config" \
+ "python-config-[0-9].[0-9]"
+ alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \
+ "python[0-9].[0-9].1${mansuffix}"
+
+ python_mod_optimize
python_mod_optimize -x "(site-packages|test)" \
- /usr/$(get_libdir)/python${PYVER}
+ /usr/lib/python${PYVER}
+ [[ "$(get_libdir)" == "lib" ]] || \
+ python_mod_optimize -x "(site-packages|test)" \
+ /usr/$(get_libdir)/python${PYVER}
+
+ # workaround possible python-upgrade-breaks-portage situation
+ if [ ! -f ${myroot}/usr/lib/portage/pym/portage.py ]; then
+ if [ -f ${myroot}/usr/lib/python2.3/site-packages/portage.py ]; then
+ einfo "Working around possible python-portage upgrade breakage"
+ mkdir -p ${myroot}/usr/lib/portage/pym
+ cp ${myroot}/usr/lib/python2.4/site-packages/{portage,xpak,output,cvstree,getbinpkg,emergehelp,dispatch_conf}.py ${myroot}/usr/lib/portage/pym
+ python_mod_optimize /usr/lib/portage/pym
+ fi
+ fi
+
+ echo
+ ewarn
+ ewarn "If you have just upgraded from an older version of python you will"
+ ewarn "need to run:"
+ ewarn
+ ewarn "/usr/sbin/python-updater"
+ ewarn
+ ewarn "This will automatically rebuild all the python dependent modules"
+ ewarn "to run with python-${PYVER}."
+ ewarn
+ ewarn "Your original Python is still installed and can be accessed via"
+ ewarn "/usr/bin/python2.x."
+ ewarn
+ ebeep 5
}
src_test() {
@@ -244,13 +289,12 @@ src_test() {
return
fi
- # Byte compiling should be enabled here.
- # Otherwise test_import fails.
+ # Disabling byte compiling breaks test_import
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 webbrowser xml_etree"
+ 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