diff options
author | Bryan Østergaard <kloeri@gentoo.org> | 2007-05-07 07:43:21 +0000 |
---|---|---|
committer | Bryan Østergaard <kloeri@gentoo.org> | 2007-05-07 07:43:21 +0000 |
commit | 6e332d915bf1f4b925920ddfe2d4e17bb7003bbc (patch) | |
tree | 2fb244d056332147ab3bc45964636d5287d4fb18 /dev-lang | |
parent | Removed src_compile and src_install since these are the eclass defaults. (diff) | |
download | gentoo-2-6e332d915bf1f4b925920ddfe2d4e17bb7003bbc.tar.gz gentoo-2-6e332d915bf1f4b925920ddfe2d4e17bb7003bbc.tar.bz2 gentoo-2-6e332d915bf1f4b925920ddfe2d4e17bb7003bbc.zip |
Build problems:
bug 120099 dev-lang/python-2.4.2 builds against sys-libs/gdbm with USE="-gdbm"
bug 135239 crosscompiling python. python-2.4.1-bindir-libdir.patch
bug 138647 dev-lang/python-x.x.x distutils installer does not link libraries
bug 150595 dev-lang/python-2.5 fails to compile with LC_ALL=de_DE@euro
bug 150732 python-2.4.3-r4 does not honor ROOT
bug 159967 python doesn't add pthread to LIBS correctly on BSD
Other problems:
bug 148362 File collision between python-2.4* and python-2.5*
bug 151695 dev-python/python-docs env.d entry incorrect
bug 158383 emerging python-2.4.3-r4 segfaults with -ipv6
bug 165268 dev-lang/python-2.4.4 fails to build the dbm module
Test failures:
bug 82469: QA issue: python-2.3.5-maketest failes with propolice
bug 124188 dev-lang/python-2.4.2 fails test_cookielib
bug 154247 dev-lang/python-2.4.4 tests failed: test_sax failed -- 1 of 42 tests failed: test_xmlgen_attr_escape
Feature requests:
bug 131325 python 2.4.4/2.3.6 enable pthreads inconditionaly
bug 135617 dev-lang/python should install Tools/freeze
bug 176066 dev-lang/python-2.5.1 bump
Fixed in current upstream version:
bug 90660 python-2.3.5: No module named fcntl
bug 144798 dev-lang/python-2.4.3 with TZ=Australia/Melbourne fails test
bug 151246 signed integer overflow bug in dev-lang/python-2.4.3
bug 159553 dev-lang/python-2.4.3-r4 fails test_openpty
bug 162057 dev-lang/python fails tests in test_expanduser
(Portage version: 2.1.2.6)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/python/ChangeLog | 39 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.2.3-r6 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.3.5-r3 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.3.6 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.3.6-r1 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.4.3-r4 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.4.4 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.4.4-r1 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.5-r2 | 6 | ||||
-rw-r--r-- | dev-lang/python/files/digest-python-2.5.1 | 6 | ||||
-rw-r--r-- | dev-lang/python/python-2.3.6-r1.ebuild | 246 | ||||
-rw-r--r-- | dev-lang/python/python-2.4.4-r1.ebuild | 300 | ||||
-rw-r--r-- | dev-lang/python/python-2.5.1.ebuild | 302 |
13 files changed, 922 insertions, 19 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog index 1dd2b0451215..78cf1e7e8fd1 100644 --- a/dev-lang/python/ChangeLog +++ b/dev-lang/python/ChangeLog @@ -1,6 +1,43 @@ # ChangeLog for dev-lang/python # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.227 2007/03/31 00:29:10 marienz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.228 2007/05/07 07:43:21 kloeri Exp $ + +*python-2.5.1 (06 May 2007) +*python-2.4.4-r1 (06 May 2007) +*python-2.3.6-r1 (06 May 2007) + + 06 May 2007; Bryan Østergaard <kloeri@gentoo.org> + +python-2.3.6-r1.ebuild, +python-2.4.4-r1.ebuild, +python-2.5.1.ebuild: + Build problems fixed: + bug 120099 dev-lang/python-2.4.2 builds against sys-libs/gdbm with USE="-gdbm" + bug 135239 crosscompiling python. python-2.4.1-bindir-libdir.patch + bug 138647 dev-lang/python-x.x.x distutils installer does not link libraries + bug 150595 dev-lang/python-2.5 fails to compile with LC_ALL=de_DE@euro + bug 150732 python-2.4.3-r4 does not honor ROOT + bug 159967 python doesn't add pthread to LIBS correctly on BSD + + Other problems fixed: + bug 148362 File collision between python-2.4* and python-2.5* + bug 151695 dev-python/python-docs env.d entry incorrect + bug 158383 emerging python-2.4.3-r4 segfaults with -ipv6 + bug 165268 dev-lang/python-2.4.4 fails to build the dbm module + + Test failures fixed: + bug 82469: QA issue: python-2.3.5-maketest failes with propolice + bug 124188 dev-lang/python-2.4.2 fails test_cookielib + bug 154247 dev-lang/python-2.4.4 tests failed: test_sax failed -- 1 of 42 tests failed: test_xmlgen_attr_escape + + Feature requests: + bug 131325 python 2.4.4/2.3.6 enable pthreads inconditionaly + bug 135617 dev-lang/python should install Tools/freeze + bug 176066 dev-lang/python-2.5.1 bump + + Fixed in current upstream version: + bug 90660 python-2.3.5: No module named fcntl + bug 144798 dev-lang/python-2.4.3 with TZ=Australia/Melbourne fails test + bug 151246 signed integer overflow bug in dev-lang/python-2.4.3 + bug 159553 dev-lang/python-2.4.3-r4 fails test_openpty + bug 162057 dev-lang/python fails tests in test_expanduser *python-2.5-r2 (31 Mar 2007) diff --git a/dev-lang/python/files/digest-python-2.2.3-r6 b/dev-lang/python/files/digest-python-2.2.3-r6 index d68a92546c72..7c3c304d1755 100644 --- a/dev-lang/python/files/digest-python-2.2.3-r6 +++ b/dev-lang/python/files/digest-python-2.2.3-r6 @@ -1,6 +1,6 @@ MD5 169f89f318e252dac0c54dd1b165d229 Python-2.2.3.tgz 6709556 RMD160 3590f813582d65194b467f4ab450e360e35eb40e Python-2.2.3.tgz 6709556 SHA256 a8f92e6b89d47359fff0d1fbfe47f104afc77fd1cd5143e7332758b7bc100188 Python-2.2.3.tgz 6709556 -MD5 e65c2bc4d45ecca1f5f18908263ac32e python-gentoo-patches-2.2.3.tar.bz2 3138 -RMD160 0160617413b2ee4165eb0a7ceb68e95cb36e0f25 python-gentoo-patches-2.2.3.tar.bz2 3138 -SHA256 e85f6afba9d2cd23f39c46ed5e50d48b971615cd5dc5bc7af766b201a03b3893 python-gentoo-patches-2.2.3.tar.bz2 3138 +MD5 c102be11419d7078b3ab6f55dad4ed94 python-gentoo-patches-2.2.3.tar.bz2 3127 +RMD160 a29d26062d7899e8657bc9efe81d49e975f2d521 python-gentoo-patches-2.2.3.tar.bz2 3127 +SHA256 cfd071700791ba0d9362c21578f011e99d961004585c4b9a14e5c89ee2c6cccf python-gentoo-patches-2.2.3.tar.bz2 3127 diff --git a/dev-lang/python/files/digest-python-2.3.5-r3 b/dev-lang/python/files/digest-python-2.3.5-r3 index 1a9d142fa577..3de2383af13b 100644 --- a/dev-lang/python/files/digest-python-2.3.5-r3 +++ b/dev-lang/python/files/digest-python-2.3.5-r3 @@ -1,6 +1,6 @@ MD5 c12b57c6e0cf8bc676fd9444d71c9e18 Python-2.3.5.tar.bz2 7230000 RMD160 2b1fa90393f517fe02d546c037996754f65f8c89 Python-2.3.5.tar.bz2 7230000 SHA256 1b81787c3dcae3752cadaa6be80c24e247c239ba93d91538af39b4b717e29bf4 Python-2.3.5.tar.bz2 7230000 -MD5 e372791bf9853db2e2ba38e7e44584ac python-gentoo-patches-2.3.5-r1.tar.bz2 9239 -RMD160 0afe928728c2cb5c306bff261e2fbe485a554c71 python-gentoo-patches-2.3.5-r1.tar.bz2 9239 -SHA256 35e1139aa91f0ac026017928df71b21da68d8470278852e700f0b32d6c638dbf python-gentoo-patches-2.3.5-r1.tar.bz2 9239 +MD5 bda3c97eedf4c0c2aee6a8a2a63bc804 python-gentoo-patches-2.3.5-r1.tar.bz2 9222 +RMD160 1f0453f09c385e7e32e9de3cb38aedb696e43ee8 python-gentoo-patches-2.3.5-r1.tar.bz2 9222 +SHA256 1aed616327b887189deae38656d48d047fcb8e18347b3476228f9d90bc0f87e3 python-gentoo-patches-2.3.5-r1.tar.bz2 9222 diff --git a/dev-lang/python/files/digest-python-2.3.6 b/dev-lang/python/files/digest-python-2.3.6 index f9c354fa420a..551aee980312 100644 --- a/dev-lang/python/files/digest-python-2.3.6 +++ b/dev-lang/python/files/digest-python-2.3.6 @@ -1,6 +1,6 @@ MD5 1bd475e69e20481c6301853eef7018f1 Python-2.3.6.tar.bz2 7350182 RMD160 db7a2ebff31e86bc99d45062fc77e4194399cc8d Python-2.3.6.tar.bz2 7350182 SHA256 120b6babcc29dfd0ba31ad1b1db587fbceee9705a569727c80d18292ba675da4 Python-2.3.6.tar.bz2 7350182 -MD5 1c2ffdfcf3de4966b211986ddab034b2 python-gentoo-patches-2.3.6-r1.tar.bz2 8483 -RMD160 20a7e020f4cecb849af1d611eb3b159440915de1 python-gentoo-patches-2.3.6-r1.tar.bz2 8483 -SHA256 995c356c6e5481299b9cedd56a510cfed59dffe50f8932192ae8343a1ad1e416 python-gentoo-patches-2.3.6-r1.tar.bz2 8483 +MD5 92c4dffbfa6d6f8938e7f16cb9396922 python-gentoo-patches-2.3.6-r1.tar.bz2 8739 +RMD160 dea3fa92374a87e32b2052b59f83c1f16f17a01b python-gentoo-patches-2.3.6-r1.tar.bz2 8739 +SHA256 62252e92180a2a21534366de0ae1c3258fdd42416ed3c5d6b055197c3856e276 python-gentoo-patches-2.3.6-r1.tar.bz2 8739 diff --git a/dev-lang/python/files/digest-python-2.3.6-r1 b/dev-lang/python/files/digest-python-2.3.6-r1 new file mode 100644 index 000000000000..4d062aef3f83 --- /dev/null +++ b/dev-lang/python/files/digest-python-2.3.6-r1 @@ -0,0 +1,6 @@ +MD5 1bd475e69e20481c6301853eef7018f1 Python-2.3.6.tar.bz2 7350182 +RMD160 db7a2ebff31e86bc99d45062fc77e4194399cc8d Python-2.3.6.tar.bz2 7350182 +SHA256 120b6babcc29dfd0ba31ad1b1db587fbceee9705a569727c80d18292ba675da4 Python-2.3.6.tar.bz2 7350182 +MD5 10d2e0684c2c5420c7f8cbe93b9f4f25 python-gentoo-patches-2.3.6-r2.tar.bz2 8961 +RMD160 8f8e9394bcb360ecb8fba31832be51230ab71a3f python-gentoo-patches-2.3.6-r2.tar.bz2 8961 +SHA256 7dfa7e604d8c1aa6680bbe81c1b8f014c95d873987c1e3916b0afce92291ca99 python-gentoo-patches-2.3.6-r2.tar.bz2 8961 diff --git a/dev-lang/python/files/digest-python-2.4.3-r4 b/dev-lang/python/files/digest-python-2.4.3-r4 index 5149e37c9791..22f742d8de64 100644 --- a/dev-lang/python/files/digest-python-2.4.3-r4 +++ b/dev-lang/python/files/digest-python-2.4.3-r4 @@ -1,6 +1,6 @@ MD5 141c683447d5e76be1d2bd4829574f02 Python-2.4.3.tar.bz2 8005915 RMD160 c86247554975e6c44f91d05e44e68e280d5244dc Python-2.4.3.tar.bz2 8005915 SHA256 c9b3bbc52fa18c6dba7a8c3481fa7de98187c9978749241395305f252134ba2c Python-2.4.3.tar.bz2 8005915 -MD5 f44313c17f2cdb0afb19faa99c641c6a python-gentoo-patches-2.4.3-r4.tar.bz2 9386 -RMD160 5515c58b626a21a19064a142a9b95e3085b20ad1 python-gentoo-patches-2.4.3-r4.tar.bz2 9386 -SHA256 06a00ae4944fae1f0920a5cb91d973bff24b5b37d609f3ef5daaacafa6bb35fb python-gentoo-patches-2.4.3-r4.tar.bz2 9386 +MD5 483a56e1fd739f24d2ca0b68d1af8906 python-gentoo-patches-2.4.3-r4.tar.bz2 9366 +RMD160 25d32b336f3e78d467da34e05d59874fe1a981a2 python-gentoo-patches-2.4.3-r4.tar.bz2 9366 +SHA256 58f81a407bc8a972709e6231f0319484f8daab0fd34cea9dc6c894e132a17b0d python-gentoo-patches-2.4.3-r4.tar.bz2 9366 diff --git a/dev-lang/python/files/digest-python-2.4.4 b/dev-lang/python/files/digest-python-2.4.4 index 1b3321e8bf6e..9e0f19038e68 100644 --- a/dev-lang/python/files/digest-python-2.4.4 +++ b/dev-lang/python/files/digest-python-2.4.4 @@ -1,6 +1,6 @@ MD5 0ba90c79175c017101100ebf5978e906 Python-2.4.4.tar.bz2 8158073 RMD160 4c7b5b70178fe69881b62201ef0bab55037d8708 Python-2.4.4.tar.bz2 8158073 SHA256 325fdc7351a08bd8d811e7fb53c41bff11764648ab1a671abd910afec946b38a Python-2.4.4.tar.bz2 8158073 -MD5 6afff79bf55000eb456f4482d0f26bb0 python-gentoo-patches-2.4.4.tar.bz2 8841 -RMD160 4652b5f3bba59b969816c00927453e0de058663e python-gentoo-patches-2.4.4.tar.bz2 8841 -SHA256 6b6b72cd25bc854f3841361d488ab74bdf0febd5a8b73c4a92054d731cd45321 python-gentoo-patches-2.4.4.tar.bz2 8841 +MD5 48235fb43dfb4ab95e3a55a9f5ab0abb python-gentoo-patches-2.4.4.tar.bz2 7943 +RMD160 196fc89ff52f4ef2795b97a95f4bb676638e54fb python-gentoo-patches-2.4.4.tar.bz2 7943 +SHA256 a048b271fa4c73ca28060114947062a984849c1f12341d9ae95772134a4a59fb python-gentoo-patches-2.4.4.tar.bz2 7943 diff --git a/dev-lang/python/files/digest-python-2.4.4-r1 b/dev-lang/python/files/digest-python-2.4.4-r1 new file mode 100644 index 000000000000..82c755bea4f8 --- /dev/null +++ b/dev-lang/python/files/digest-python-2.4.4-r1 @@ -0,0 +1,6 @@ +MD5 0ba90c79175c017101100ebf5978e906 Python-2.4.4.tar.bz2 8158073 +RMD160 4c7b5b70178fe69881b62201ef0bab55037d8708 Python-2.4.4.tar.bz2 8158073 +SHA256 325fdc7351a08bd8d811e7fb53c41bff11764648ab1a671abd910afec946b38a Python-2.4.4.tar.bz2 8158073 +MD5 6c60f8d67ac0302b33908ed9b6a97bb0 python-gentoo-patches-2.4.4-r1.tar.bz2 8152 +RMD160 a5896693bbe309641b995e96ff6adbe7564e5944 python-gentoo-patches-2.4.4-r1.tar.bz2 8152 +SHA256 1f74368d52fea0372f123c9f5d988e93ab7d04c98a4ab5d931c36908c0dfd569 python-gentoo-patches-2.4.4-r1.tar.bz2 8152 diff --git a/dev-lang/python/files/digest-python-2.5-r2 b/dev-lang/python/files/digest-python-2.5-r2 index 65112d30ab89..16bc0311d4fc 100644 --- a/dev-lang/python/files/digest-python-2.5-r2 +++ b/dev-lang/python/files/digest-python-2.5-r2 @@ -1,6 +1,6 @@ MD5 ddb7401e711354ca83b7842b733825a3 Python-2.5.tar.bz2 9357099 RMD160 f6977a6c3d3ca54c27ad9270918237a7e6521d0b Python-2.5.tar.bz2 9357099 SHA256 584fce420e39218312c86b6abb242a14b1b0c1d215e2667b0f491893e41cc236 Python-2.5.tar.bz2 9357099 -MD5 e7cf168a72f985f68d3cd7dd4eb96eb4 python-gentoo-patches-2.5-r2.tar.bz2 6047 -RMD160 b11e1d529486e2ed88bd34e1ebb0cebf6d4e47cc python-gentoo-patches-2.5-r2.tar.bz2 6047 -SHA256 f4c8d4a924f48ab35b3281cceffe7237efef69f3bc5a68c3492d8b21d60813b8 python-gentoo-patches-2.5-r2.tar.bz2 6047 +MD5 6ce16b7354b112e74dfc03e30d284f18 python-gentoo-patches-2.5-r2.tar.bz2 6037 +RMD160 5b1785c2309bb244baa71a5bdde5c91299dc014c python-gentoo-patches-2.5-r2.tar.bz2 6037 +SHA256 bf375c40c46b90796fe8b7c75b20424f16b984293e1878aa169b7bcd462f5a17 python-gentoo-patches-2.5-r2.tar.bz2 6037 diff --git a/dev-lang/python/files/digest-python-2.5.1 b/dev-lang/python/files/digest-python-2.5.1 new file mode 100644 index 000000000000..08760a3abd98 --- /dev/null +++ b/dev-lang/python/files/digest-python-2.5.1 @@ -0,0 +1,6 @@ +MD5 70084ffa561660f07de466c2c8c4842d Python-2.5.1.tar.bz2 9383651 +RMD160 af0e8ed93bbc07015c338ae19bbee8811da21c1c Python-2.5.1.tar.bz2 9383651 +SHA256 d0b5d4dce02c56d2eb0728db3ebd63afc3dae906d158be6532ae4480d311e167 Python-2.5.1.tar.bz2 9383651 +MD5 b0ce842816939c01d94cb75127296c0e python-gentoo-patches-2.5.1.tar.bz2 5430 +RMD160 7cdfb51c00a49ebb9027228691e10b8c4c3f574f python-gentoo-patches-2.5.1.tar.bz2 5430 +SHA256 065f31d46c3b57d99b1c3236bbaf445ca142fda33c9ef13e7e2e39be3d027499 python-gentoo-patches-2.5.1.tar.bz2 5430 diff --git a/dev-lang/python/python-2.3.6-r1.ebuild b/dev-lang/python/python-2.3.6-r1.ebuild new file mode 100644 index 000000000000..742dbf26514b --- /dev/null +++ b/dev-lang/python/python-2.3.6-r1.ebuild @@ -0,0 +1,246 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.3.6-r1.ebuild,v 1.1 2007/05/07 07:43:21 kloeri 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. + +inherit eutils flag-o-matic python versionator + +PYVER_MAJOR=$(get_major_version) +PYVER_MINOR=$(get_version_component_range 2) +PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" + +S="${WORKDIR}/Python-${PV}" +DESCRIPTION="A really great language" +HOMEPAGE="http://www.python.org/" +SRC_URI="http://www.python.org/ftp/python/${PV%_*}/Python-${PV}.tar.bz2 + mirror://gentoo/python-gentoo-patches-${PV}-r2.tar.bz2" + +LICENSE="PSF-2.2" +SLOT="2.3" +KEYWORDS="~x86" +IUSE="ncurses gdbm ssl readline tk berkdb bootstrap ipv6 build ucs2 doc nocxx nptl examples" + +# INFO: 2.3.5 docs are used for python-2.3.6 as upstream writes in their release +# notes. +DEPEND=">=sys-libs/zlib-1.1.3 + !build? ( + 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.3.5* ) + dev-libs/expat + )" + +# NOTE: The dev-python/python-fchksum RDEPEND is needed so that this python +# provides the functionality expected from previous pythons. + +# NOTE: python-fchksum is only a RDEPEND and not a DEPEND since we don't need +# it to compile python. We just need to ensure that when we install +# python, we definitely have fchksum support. - liquidx + +# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri + +PDEPEND="${DEPEND} dev-python/python-fchksum app-admin/python-updater" + + +PROVIDE="virtual/python" + +# confcache breaks a dlopen check, causing python to not support +# loading .so files - marienz +RESTRICT="confcache" + +src_unpack() { + unpack ${A} + cd ${S} + + sed -ie 's/OpenBSD\/3.\[01234/OpenBSD\/3.\[012345/' configure || die "OpenBSD sed failed" + + # fix os.utime() on hppa. utimes it not supported but unfortunately + # reported as working - gmsoft (22 May 04) + [ "${ARCH}" = "hppa" ] && sed -e 's/utimes //' -i ${S}/configure + + 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 + + eautoreconf +} + +src_configure() { + # disable extraneous modules with extra dependencies + if use build; then + export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" + export PYTHON_DISABLE_SSL=1 + else + use gdbm \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm" + use berkdb \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm bsddb" + use readline \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline" + use tk \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter" + use ncurses \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel" + use ssl \ + || export PYTHON_DISABLE_SSL=1 + export PYTHON_DISABLE_MODULES + echo $PYTHON_DISABLE_MODULES + fi +} + +src_compile() { + filter-flags -malign-double + + [ "${ARCH}" = "alpha" ] && append-flags -fPIC + [ "${ARCH}" = "amd64" ] && append-flags -fPIC + + # http://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 + + export OPT="${CFLAGS}" + + local myconf + #if we are creating a new build image, we remove the dependency on g++ + if use build && ! use bootstrap || use nocxx ; then + myconf="--with-cxx=no" + fi + + # 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" \ + || myconf="${myconf} --enable-unicode=ucs4" + + src_configure + + econf --with-fpectl \ + --enable-shared \ + `use_enable ipv6` \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + `use_with nptl threads` \ + --with-libc='' \ + ${myconf} || die + emake || die "Parallel make failed" +} + +src_install() { + dodir /usr + src_configure + make DESTDIR="${D}" altinstall || die + + # install our own custom python-config + exeinto /usr/bin + newexe ${FILESDIR}/python-config-${PYVER} python-config + + # The stuff below this line extends from 2.1, and should be deprecated + # in 2.3, or possibly can wait till 2.4 + + # seems like the build do not install Makefile.pre.in anymore + # it probably shouldn't - use DistUtils, people! + insinto /usr/$(get_libdir)/python${PYVER}/config + doins ${S}/Makefile.pre.in + + # While we're working on the config stuff... Let's fix the OPT var + # so that it doesn't have any opts listed in it. Prevents the problem + # with compiling things with conflicting opts later. + dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' /usr/$(get_libdir)/python${PYVER}/config/Makefile + + if use build ; then + rm -rf ${D}/usr/$(get_libdir)/python2.3/{test,encodings,email,lib-tk,bsddb/test} + else + use elibc_uclibc && rm -rf ${D}/usr/$(get_libdir)/python2.3/{test,bsddb/test} + use berkdb || rm -rf ${D}/usr/$(get_libdir)/python2.3/bsddb + use tk || rm -rf ${D}/usr/$(get_libdir)/python2.3/lib-tk + fi + + if use examples ; then + mkdir -p ${D}/usr/share/doc/${P}/examples + cp -r ${S}/Tools ${D}/usr/share/doc/${P}/examples + fi +} + +pkg_postrm() { + python_makesym + python_mod_cleanup /usr/$(get_libdir)/python2.3 +} + +pkg_postinst() { + local myroot + myroot=$(echo $ROOT | sed 's:/$::') + + python_makesym + python_mod_optimize + python_mod_optimize -x site-packages -x test ${myroot}/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.2/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.2/site-packages/{portage,xpak,output,cvstree,getbinpkg,emergehelp,dispatch_conf}.py ${myroot}/usr/lib/portage/pym + python_mod_optimize ${myroot}/usr/lib/portage/pym + fi + fi + + echo + ewarn + ewarn "If you have just upgraded from an older version of python you" + ewarn "will 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() { + # PYTHON_DONTCOMPILE=1 breaks test_import + unset PYTHON_DONTCOMPILE + + #skip all tests that fail during emerge but pass without emerge: + #(See bug# 67970) + local skip_tests="global mimetools mmap strptime subprocess tcl time urllib urllib2 zipimport" + + for test in ${skip_tests} ; do + mv ${S}/Lib/test/test_${test}.py ${T} + done + + make test || 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/lib/python${PYVER}/test" + elog "and run the tests separately." +} + diff --git a/dev-lang/python/python-2.4.4-r1.ebuild b/dev-lang/python/python-2.4.4-r1.ebuild new file mode 100644 index 000000000000..410143ec6f94 --- /dev/null +++ b/dev-lang/python/python-2.4.4-r1.ebuild @@ -0,0 +1,300 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.4.4-r1.ebuild,v 1.1 2007/05/07 07:43:21 kloeri 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. + +inherit eutils flag-o-matic python multilib versionator toolchain-funcs alternatives + +# 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}" + +MY_P="Python-${PV}" +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" + +LICENSE="PSF-2.2" +SLOT="2.4" +KEYWORDS="~x86" +IUSE="ncurses gdbm ssl readline tk berkdb bootstrap ipv6 build ucs2 doc nocxx nptl examples" + +DEPEND=">=sys-libs/zlib-1.1.3 + !dev-python/cjkcodecs + !build? ( + 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-${PV}* ) + dev-libs/expat + )" + +# NOTE: The dev-python/python-fchksum RDEPEND is needed so that this python +# provides the functionality expected from previous pythons. + +# NOTE: python-fchksum is only a RDEPEND and not a DEPEND since we don't need +# it to compile python. We just need to ensure that when we install +# python, we definitely have fchksum support. - liquidx + +# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri + +PDEPEND="${DEPEND} dev-python/python-fchksum app-admin/python-updater" + +PROVIDE="virtual/python" + +# confcache breaks a dlopen check, causing python to not support +# loading .so files - marienz +RESTRICT="confcache" + +src_unpack() { + unpack ${A} + cd ${S} + + einfo $(pwd) + 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 + + # 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 + + eautoreconf +} + +src_configure() { + # disable extraneous modules with extra dependencies + if use build; then + export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses _curses_panel _tkinter" + export PYTHON_DISABLE_SSL=1 + else + use gdbm \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm" + use berkdb \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm bsddb" + use readline \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline" + use tk \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter" + use ncurses \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel" + use ssl \ + || export PYTHON_DISABLE_SSL=1 + export PYTHON_DISABLE_MODULES + echo $PYTHON_DISABLE_MODULES + fi +} + +src_compile() { + filter-flags -malign-double + + # Seems to no longer be necessary + #[ "${ARCH}" = "amd64" ] && append-flags -fPIC + [ "${ARCH}" = "alpha" ] && append-flags -fPIC + + # http://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 + + export OPT="${CFLAGS}" + + local myconf + #if we are creating a new build image, we remove the dependency on g++ + if use build && ! use bootstrap || use nocxx ; then + myconf="--with-cxx=no" + fi + + # 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" \ + || myconf="${myconf} --enable-unicode=ucs4" + + src_configure + + if tc-is-cross-compiler ; then + OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ + ./configure --with-cxx=no || 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 + fi + + # export CXX so it ends up in /usr/lib/python2.x/config/Makefile + tc-export CXX + # set LINKCC to prevent python from being linked to libstdc++.so + export LINKCC="\$(PURIFY) \$(CC)" + econf \ + --with-fpectl \ + --enable-shared \ + `use_enable ipv6` \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + `use_with nptl threads` \ + --with-libc='' \ + ${myconf} || die + emake || die "Parallel make failed" +} + +src_install() { + dodir /usr + src_configure + make DESTDIR="${D}" altinstall maninstall || die + + # install our own custom python-config + exeinto /usr/bin + doexe ${FILESDIR}/python-config-${PYVER} + + # Use correct libdir in python-config + dosed "s:/usr/lib/:/usr/$(get_libdir)/:" /usr/bin/python-config-${PYVER} + + if use build ; then + rm -rf ${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 + fi + + # 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 + + prep_ml_includes usr/include/python${PYVER} + + + # The stuff below this line extends from 2.1, and should be deprecated + # in 2.3, or possibly can wait till 2.4 + + # seems like the build do not install Makefile.pre.in anymore + # it probably shouldn't - use DistUtils, people! + insinto /usr/$(get_libdir)/python${PYVER}/config + doins ${S}/Makefile.pre.in + + # While we're working on the config stuff... Let's fix the OPT var + # so that it doesn't have any opts listed in it. Prevents the problem + # with compiling things with conflicting opts later. + dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' \ + /usr/$(get_libdir)/python${PYVER}/config/Makefile + + if use examples ; then + mkdir -p ${D}/usr/share/doc/${P}/examples + cp -r ${S}/Tools ${D}/usr/share/doc/${P}/examples + fi +} + +pkg_postrm() { +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.gz" \ + "python[0-9].[0-9].1.gz" + + python_mod_cleanup /usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || \ + python_mod_cleanup /usr/$(get_libdir)/python${PYVER} +} + +pkg_postinst() { + local myroot + myroot=$(echo $ROOT | sed 's:/$::') + + 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.gz" \ + "python[0-9].[0-9].1.gz" + + python_mod_optimize + python_mod_optimize -x site-packages \ + -x test ${myroot}/usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || \ + python_mod_optimize -x site-packages \ + -x test ${myroot}/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 ${myroot}/usr/lib/portage/pym + fi + fi + + echo + ewarn + ewarn "If you have just upgraded from an older version of python you" + ewarn "will 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() { + # PYTHON_DONTCOMPILE=1 breaks test_import + unset PYTHON_DONTCOMPILE + + #skip all tests that fail during emerge but pass without emerge: + #(See bug# 67970) + local skip_tests="cookielib distutils global hotshot mimetools minidom mmap posix sax strptime subprocess syntax tcl time urllib urllib2" + + for test in ${skip_tests} ; do + mv ${S}/Lib/test/test_${test}.py ${T} + done + + # rerun failed tests in verbose mode (regrtest -w) + EXTRATESTOPTS="-w" make test || 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/lib/python${PYVER}/test" + elog "and run the tests separately." +} diff --git a/dev-lang/python/python-2.5.1.ebuild b/dev-lang/python/python-2.5.1.ebuild new file mode 100644 index 000000000000..3e4a76879a00 --- /dev/null +++ b/dev-lang/python/python-2.5.1.ebuild @@ -0,0 +1,302 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.1.ebuild,v 1.1 2007/05/07 07:43:21 kloeri 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. + +inherit eutils autotools flag-o-matic python multilib versionator toolchain-funcs alternatives + +# 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}" + +MY_P="Python-${PV}" +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}.tar.bz2" + +LICENSE="PSF-2.2" +SLOT="2.5" +KEYWORDS="~x86" +IUSE="ncurses gdbm ssl readline tk berkdb bootstrap ipv6 build ucs2 sqlite doc nocxx nptl examples" + +# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes,cjkcodecs} +# do not conflict with the ones in python proper. - liquidx + +DEPEND=">=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-${PV}* ) + dev-libs/expat + )" + +# NOTE: The dev-python/python-fchksum RDEPEND is needed so that this python +# provides the functionality expected from previous pythons. + +# NOTE: python-fchksum is only a RDEPEND and not a DEPEND since we don't need +# it to compile python. We just need to ensure that when we install +# python, we definitely have fchksum support. - liquidx + +# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri + +PDEPEND="${DEPEND} dev-python/python-fchksum app-admin/python-updater" +PROVIDE="virtual/python" + +# confcache breaks a dlopen check, causing python to not support +# loading .so files - marienz +RESTRICT="confcache" + +src_unpack() { + unpack ${A} + cd "${S}" + + 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 + + # 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 tc-is-cross-compiler ; then +# epatch "${WORKDIR}/${PV}/2.4.1-crosscompile.patch" +# fi + + eautoreconf +} + +src_configure() { + # 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 + use gdbm \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} gdbm" + use berkdb \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} dbm bsddb" + use readline \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} readline" + use tk \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _tkinter" + use ncurses \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _curses _curses_panel" + use sqlite \ + || PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _sqlite3" + use ssl \ + || export PYTHON_DISABLE_SSL=1 + export PYTHON_DISABLE_MODULES + echo $PYTHON_DISABLE_MODULES + fi +} + +src_compile() { + filter-flags -malign-double + + # Seems to no longer be necessary + #[ "${ARCH}" = "amd64" ] && append-flags -fPIC + [ "${ARCH}" = "alpha" ] && append-flags -fPIC + + # http://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 + + export OPT="${CFLAGS}" + + local myconf + #if we are creating a new build image, we remove the dependency on g++ + if use build && ! use bootstrap || use nocxx ; then + myconf="--with-cxx=no" + fi + + # 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" \ + || myconf="${myconf} --enable-unicode=ucs4" + + src_configure + + if tc-is-cross-compiler ; then + OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ + ./configure --with-cxx=no || 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 + fi + + # export CXX so it ends up in /usr/lib/python2.x/config/Makefile + tc-export CXX + # set LINKCC to prevent python from being linked to libstdc++.so + export LINKCC="\$(PURIFY) \$(CC)" + econf \ + --with-fpectl \ + --enable-shared \ + `use_enable ipv6` \ + --infodir='${prefix}'/share/info \ + --mandir='${prefix}'/share/man \ + `use_with nptl threads` \ + --with-libc='' \ + ${myconf} || die + emake || die "Parallel make failed" +} + +src_install() { + dodir /usr + src_configure + make DESTDIR="${D}" altinstall maninstall || die + + mv ${D}/usr/bin/python${PYVER}-config ${D}/usr/bin/python-config-${PYVER} + + # 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 + + # While we're working on the config stuff... Let's fix the OPT var + # so that it doesn't have any opts listed in it. Prevents the problem + # with compiling things with conflicting opts later. + dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' \ + /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} + 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 + fi + + prep_ml_includes usr/include/python${PYVER} + + # The stuff below this line extends from 2.1, and should be deprecated + # in 2.3, or possibly can wait till 2.4 + + # seems like the build do not install Makefile.pre.in anymore + # it probably shouldn't - use DistUtils, people! + insinto /usr/$(get_libdir)/python${PYVER}/config + doins ${S}/Makefile.pre.in + + if use examples ; then + mkdir -p ${D}/usr/share/doc/${P}/examples + cp -r ${S}/Tools ${D}/usr/share/doc/${P}/examples + fi +} + +pkg_postrm() { + 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/share/man/man1/python.1.gz" \ + "python[0-9].[0-9].1.gz" + alternatives_auto_makesym "/usr/bin/python-config" \ + "python-config-[0-9].[0-9]" + + python_mod_cleanup /usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || \ + python_mod_cleanup /usr/$(get_libdir)/python${PYVER} +} + +pkg_postinst() { + local myroot + myroot=$(echo $ROOT | sed 's:/$::') + + 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.gz" \ + "python[0-9].[0-9].1.gz" + + python_mod_optimize + python_mod_optimize -x site-packages \ + -x test ${myroot}/usr/lib/python${PYVER} + [[ "$(get_libdir)" == "lib" ]] || \ + python_mod_optimize -x site-packages \ + -x test ${myroot}/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 ${myroot}/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() { + # PYTHON_DONTCOMPILE=1 breaks test_import + unset PYTHON_DONTCOMPILE + + #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" + + for test in ${skip_tests} ; do + mv ${S}/Lib/test/test_${test}.py ${T} + done + + # rerun failed tests in verbose mode (regrtest -w) + EXTRATESTOPTS="-w" make test || 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/lib/python${PYVER}/test" + elog "and run the tests separately." +} |