summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-08-02 19:24:35 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-08-02 19:24:35 +0000
commit09e11b785919f0fc3871008a710beea1f20d6671 (patch)
tree0fa6ccf9768949f17c31d7e6724f1ab42bb14b36 /dev-lang/python
parentppc64 stable wrt #327777 (diff)
downloadhistorical-09e11b785919f0fc3871008a710beea1f20d6671.tar.gz
historical-09e11b785919f0fc3871008a710beea1f20d6671.tar.bz2
historical-09e11b785919f0fc3871008a710beea1f20d6671.zip
Improve usage of mmap in _ctypes module (bug #329499).
Fix handling of environmental variables (bug #329705). Backport some fixes from release branches. Package-Manager: portage-HEAD/cvs/Linux x86_64
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/ChangeLog13
-rw-r--r--dev-lang/python/Manifest8
-rw-r--r--dev-lang/python/python-2.6.5_p20100801.ebuild302
-rw-r--r--dev-lang/python/python-2.7_p20100801.ebuild316
-rw-r--r--dev-lang/python/python-3.1.2_p20100801.ebuild309
5 files changed, 946 insertions, 2 deletions
diff --git a/dev-lang/python/ChangeLog b/dev-lang/python/ChangeLog
index 00c062025a90..efddf8c54162 100644
--- a/dev-lang/python/ChangeLog
+++ b/dev-lang/python/ChangeLog
@@ -1,6 +1,17 @@
# 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.485 2010/07/31 19:14:08 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.486 2010/08/02 19:24:35 arfrever Exp $
+
+*python-3.1.2_p20100801 (02 Aug 2010)
+*python-2.7_p20100801 (02 Aug 2010)
+*python-2.6.5_p20100801 (02 Aug 2010)
+
+ 02 Aug 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ +python-2.6.5_p20100801.ebuild, +python-2.7_p20100801.ebuild,
+ +python-3.1.2_p20100801.ebuild:
+ Improve usage of mmap in _ctypes module (bug #329499). Fix handling of
+ environmental variables (bug #329705). Backport some fixes from release
+ branches.
31 Jul 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
python-2.6.4-r1.ebuild, python-2.6.5-r2.ebuild, python-2.6.5-r3.ebuild,
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 7d564ba5d334..a1b0c1a92117 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -16,16 +16,22 @@ DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 RMD160 c3a807693103f9e26c3cce4
DIST python-gentoo-patches-2.6.4-r1.tar.bz2 12570 RMD160 2a58eb651ce5adc68c4667fb0ddc42cc215ea342 SHA1 c5de0442890bc0753c445a88390d932e629c8648 SHA256 2fe6c8838df2c07d3232ebb26c128dab2787c43a76ddb0b55acec1bed657f9f2
DIST python-gentoo-patches-2.6.5-r4.tar.bz2 68611 RMD160 63a67a772df32dcf1977c1060228f5282a332a41 SHA1 e29469ff9800ff3125d203eea152bfdf378b7234 SHA256 7497892864469a9ff8698dcd6467cb6ddadd3b8472e8847b9e27f738ff7962ab
DIST python-gentoo-patches-2.6.5-r5.tar.bz2 1482491 RMD160 a7978912b8598a589a82746642fa5b676369c599 SHA1 26c983e79ac32b63a3bc6e411d96b9233524733b SHA256 6cb8cf0e1418cad035a243c08dfeee2e9395397dda74ada49667b3eba63bb76c
+DIST python-gentoo-patches-2.6.5-r6.tar.bz2 1491627 RMD160 9e4efef5edd5929d5ed34c19db420595b63d9284 SHA1 f2b38cc47bb7c863aaade40c98cba1c9c070b58b SHA256 8004519c65ae175748f32c76bd646c3d0c07043fef91c9786f7f19ec2dcdbd9a
+DIST python-gentoo-patches-2.7-r1.tar.bz2 49066 RMD160 ecb2e09c708bd62b8fbeabaa12f87f744d511305 SHA1 a79564b27a5aa1f588cd4d38c42710e99993e63f SHA256 806404a8ab4a7429f153edf5588cc6d07fff2544058435cd01df10dbe901ed88
DIST python-gentoo-patches-2.7.tar.bz2 11803 RMD160 a4bef5c904859f530f6cf5009ac60d171c34af00 SHA1 06b3f6077febed0aa807cb81cd689215efc430c6 SHA256 c72446007ab1b4dd0d8702b0901a8b5e8eadb1ce6872e7f99e12f4eb97874b0f
DIST python-gentoo-patches-3.1.2-r5.tar.bz2 67359 RMD160 0ee5576b7de728a0840c6020d8403b94a883eeaa SHA1 5900a751c7e6fea512f79e045aa2f7870e378595 SHA256 fa5eabe0cc84789e9ed2fd6140dfdf08ca29de00474b117b9998b0eefc2e850a
DIST python-gentoo-patches-3.1.2-r6.tar.bz2 1285912 RMD160 a525679255b2dcb0a65d00792a8c247742e94923 SHA1 7ab91a40074f33b08b805b2cce54dc32c1f596b1 SHA256 45a4368f537b2d92ead296dd600207313a20a8027dcaeaa2a0c71dcf8ecb9899
+DIST python-gentoo-patches-3.1.2-r7.tar.bz2 1309851 RMD160 5bb3276bda6c9f76022745b396441a342c3d4f0e SHA1 912bebb15d3a00c5b29bb9e169ecb328cf60410e SHA256 a4ea58c1e2200893ce2f8012bd0c5037cbe42977f87908e1104c16de1dd98ded
EBUILD python-2.4.6.ebuild 9295 RMD160 ceafad3166524ebb3bb89c58efb8aff255053dd1 SHA1 8545e8b5671180216a863170213bd3f95666518c SHA256 03b17693ea85c22aeb13c3105330cf0aebaf9f9e241b0cc81a03c39cf5c959e0
EBUILD python-2.5.4-r4.ebuild 9645 RMD160 21881a4d1f0e8245b1821109ab26e775d55e94c6 SHA1 2c1b8b54b5ec5902521d9e9017d669c67ae15160 SHA256 c6dc2f20bf1edbbdee06ab87ed5618d0f5e07172c212a51cb44a86df706591c1
EBUILD python-2.6.4-r1.ebuild 9579 RMD160 192fa57b6aecb1220030f1333cdd3588ebdd27df SHA1 a9f3a808c04a974c1214c5c7014bf40ba474b495 SHA256 de57a0994b1b1754c3a95612f83c0dfae9e5f6aa4aae8bd0f54588d50dd4529d
EBUILD python-2.6.5-r2.ebuild 9456 RMD160 1518fc885de1b67c0fc25344f64dbae89e7f879b SHA1 e332ce8d5cc817ab82b50c4baef4c2e69662bed4 SHA256 ca72ffa86fd43037230320b64820cdc52d893510f20125ad6384bca2101a3870
EBUILD python-2.6.5-r3.ebuild 9452 RMD160 7a9c8456a7e2781f6958ed4cf132831b6459dde7 SHA1 c2d2f43b89f11edbb0bfe9a01015ff3e4f7a028a SHA256 5468b51c9ec73af51c17aab06be1776ea98bcde443c6f5099aaa13da870fbe07
+EBUILD python-2.6.5_p20100801.ebuild 9060 RMD160 eb06f5389c6b57ef139120c9e9aa3f9a8ec38dd7 SHA1 6411452a239ddb383b316aef60722ad17989becb SHA256 0fe838e020f6226c9ebeb4e32144914aa84cdae931659e763d4b7c9479312717
EBUILD python-2.7.ebuild 9743 RMD160 f7df4eb4d393e2ec188ec37a31bf5d5805833525 SHA1 97d6610b195ea53f179ab980c5b46d2df407a697 SHA256 82a6ab3484118c2ee23784f24e868096cce7ec5351a7b6a1cd35f7f1e349d92a
+EBUILD python-2.7_p20100801.ebuild 9354 RMD160 16308d7b6c2117a58bb79541387dfeb9b8239525 SHA1 8e7582cbfe40537eb73b8808f71a7bee736de8ef SHA256 780daab85dad4e4e4b22cfe328fe7e0be02934f44f657aca34cd57bd646a7511
EBUILD python-3.1.2-r3.ebuild 9254 RMD160 8bf16f2c60592d84ffe549f2e3572692dea6b9db SHA1 1351a829379f38c7d4290760f1e9960b50e572e3 SHA256 f69b6e60d97c3bf19afdf5c62d54c3c45aacd79b72ff0685d4a09b15fe2b9a25
EBUILD python-3.1.2-r4.ebuild 9536 RMD160 85aae391c9a029d21176d8c66840935de759ac58 SHA1 ae22dc4cc6e2988fde17fb8f2b52fb4147abdef8 SHA256 2d5023aabd8e4448e8886f25dd66f6d7b097e7ab6e7d3d69d78766e9a6397f9d
-MISC ChangeLog 86512 RMD160 da3973be102383ecb91606961cf818965ec52acf SHA1 add9d914eeccdb3d3e1d0641277b3302923b8df1 SHA256 b8885d9d9a45670729f138f5a761f3a0a4c9968e19ca8bd01c6c498e50126d11
+EBUILD python-3.1.2_p20100801.ebuild 8979 RMD160 48dfbf00dfdce9ce00da8ead112cfb07c18339ee SHA1 1e86f5a967e5cf16f283520e9891004a1b6e09e6 SHA256 05193cfe2651a3950bb5275c22760e36c4a9ce63d53cbc01b781805701e9ff2e
+MISC ChangeLog 86956 RMD160 d71162a897229527f86d7275f1cc9e04950d5905 SHA1 85fa6683158d0ee97834152c5e739e400aa16c64 SHA256 3e923cb497145846d14de4514ae3832b80fc463475d866da800fc79e9b40d32b
MISC metadata.xml 661 RMD160 54831d16b8807086bfabdbb3df9d33336b5d42a0 SHA1 9867c337fe9e6f4e967004fc9409763e0fedf43b SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908
diff --git a/dev-lang/python/python-2.6.5_p20100801.ebuild b/dev-lang/python/python-2.6.5_p20100801.ebuild
new file mode 100644
index 000000000000..882809909887
--- /dev/null
+++ b/dev-lang/python/python-2.6.5_p20100801.ebuild
@@ -0,0 +1,302 @@
+# 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.6.5_p20100801.ebuild,v 1.1 2010/08/02 19:24:35 arfrever Exp $
+
+EAPI="2"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs
+
+MY_PV="${PV%_p*}"
+MY_P="Python-${MY_PV}"
+
+PATCHSET_REVISION="6"
+
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.bz2
+ mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.6"
+PYTHON_ABI="${SLOT}"
+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"
+
+RDEPEND=">=app-admin/eselect-python-20091230
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ berkdb? ( || (
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ ) )
+ 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 )
+ )
+ doc? ( dev-python/python-docs:${SLOT} )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND="app-admin/python-updater"
+
+PROVIDE="virtual/python"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ 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
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if ! tc-is-cross-compiler; then
+ rm "${WORKDIR}/${MY_PV}"/*_all_crosscompile.patch
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${MY_PV}"
+
+ # Avoid regeneration, which would not change contents of files.
+ touch Include/Python-ast.h Python/Python-ast.c
+
+ 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@@"
+
+ if ! use wininst; then
+ # Remove Microsoft Windows executables.
+ rm Lib/distutils/command/wininst-*.exe
+ fi
+
+ # Fix OtherFileTests.testStdin() not to assume
+ # that stdin is a tty for bug #248081.
+ sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed"
+
+ 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 _elementtree 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+=" _elementtree pyexpat" # _elementtree uses 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -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.6 correctly.
+ # Needed on FreeBSD unless Python 2.6 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ OPT="" 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_test() {
+ # Tests will not 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 failing tests.
+ local skip_tests="distutils httpservers minidom pyexpat sax tcl"
+
+ # 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
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ EXTRATESTOPTS="-w" emake test
+ local result="$?"
+
+ 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 would like to run them, you may:"
+ elog "cd '${EPREFIX}$(python_get_libdir)/test'"
+ elog "and run the tests separately."
+
+ python_disable_pyc
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
+
+ emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
+ python_clean_installation_image -q
+
+ mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+ mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test}
+ else
+ use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test}
+ use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*}
+ use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk}
+ fi
+
+ use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing"
+
+ prep_ml_includes $(python_get_includedir)
+
+ dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}/Tools" || die "doins failed"
+ fi
+
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
+
+ # Do not install empty directory.
+ rmdir "${ED}$(python_get_libdir)/lib-old"
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ eselect python update --python2 || eselect python update
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
+
+ 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 $(python_get_libdir)
+}
diff --git a/dev-lang/python/python-2.7_p20100801.ebuild b/dev-lang/python/python-2.7_p20100801.ebuild
new file mode 100644
index 000000000000..3c7323ebeed9
--- /dev/null
+++ b/dev-lang/python/python-2.7_p20100801.ebuild
@@ -0,0 +1,316 @@
+# 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.7_p20100801.ebuild,v 1.1 2010/08/02 19:24:35 arfrever Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic multilib pax-utils python toolchain-funcs
+
+MY_PV="${PV%_p*}"
+MY_P="Python-${MY_PV}"
+
+PATCHSET_REVISION="1"
+
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.bz2
+ mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="2.7"
+PYTHON_ABI="${SLOT}"
+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}
+# do not conflict with the ones in python proper. - liquidx
+
+RDEPEND=">=app-admin/eselect-python-20091230
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ berkdb? ( || (
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ ) )
+ 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 )
+ )
+ doc? ( dev-python/python-docs:${SLOT} )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND="app-admin/python-updater"
+
+PROVIDE="virtual/python"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ 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
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if ! tc-is-cross-compiler; then
+ rm "${WORKDIR}/${MY_PV}"/*_all_crosscompile.patch
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${MY_PV}"
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ if ! use wininst; then
+ # Remove Microsoft Windows executables.
+ rm Lib/distutils/command/wininst-*.exe
+ fi
+
+ # Fix OtherFileTests.testStdin() not to assume
+ # that stdin is a tty for bug #248081.
+ sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed"
+
+ # Support versions of Autoconf other than 2.65.
+ sed -e "/version_required(2\.65)/d" -i configure.in || die "sed failed"
+}
+
+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 _elementtree 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+=" _elementtree pyexpat" # _elementtree uses 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -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.7 correctly.
+ # Needed on FreeBSD unless Python 2.7 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+ if use berkdb; then
+ dbmliborder+="${dbmliborder:+:}bdb"
+ fi
+
+ OPT="" 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-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --with-system-expat \
+ --with-system-ffi
+}
+
+src_test() {
+ # Tests will not 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 failing tests.
+ local skip_tests="distutils gdb minidom pyexpat sax"
+
+ # 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
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ EXTRATESTOPTS="-w" emake test
+ local result="$?"
+
+ 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 would like to run them, you may:"
+ elog "cd '${EPREFIX}$(python_get_libdir)/test'"
+ elog "and run the tests separately."
+
+ python_disable_pyc
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/"
+
+ emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed"
+ python_clean_installation_image -q
+
+ mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test}
+ else
+ use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test}
+ use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*}
+ use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk}
+ fi
+
+ use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing"
+
+ prep_ml_includes $(python_get_includedir)
+
+ dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}/Tools" || die "doins failed"
+ fi
+
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
+
+ # Do not install empty directories.
+ rmdir "${ED}$(python_get_libdir)/lib-old"
+ rmdir "${ED}$(python_get_libdir)/test/data"
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ eselect python update --python2 || eselect python update
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
+
+ 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 $(python_get_libdir)
+}
diff --git a/dev-lang/python/python-3.1.2_p20100801.ebuild b/dev-lang/python/python-3.1.2_p20100801.ebuild
new file mode 100644
index 000000000000..2600c72725f1
--- /dev/null
+++ b/dev-lang/python/python-3.1.2_p20100801.ebuild
@@ -0,0 +1,309 @@
+# 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-3.1.2_p20100801.ebuild,v 1.1 2010/08/02 19:24:35 arfrever Exp $
+
+EAPI="3"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs
+
+MY_PV="${PV%_p*}"
+MY_P="Python-${MY_PV}"
+
+PATCHSET_REVISION="7"
+
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.bz2
+ mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2"
+
+LICENSE="PSF-2.2"
+SLOT="3.1"
+PYTHON_ABI="${SLOT}"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+
+RDEPEND=">=app-admin/eselect-python-20091230
+ >=sys-libs/zlib-1.1.3
+ virtual/libffi
+ virtual/libintl
+ !build? (
+ 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 )
+ )
+ doc? ( dev-python/python-docs:${SLOT} )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-admin/python-updater-0.8
+ || (
+ dev-lang/python:2.7[gdbm?,ipv6?,ncurses?,readline?,sqlite?,ssl?,threads?,tk?,xml?]
+ dev-lang/python:2.6[gdbm?,ipv6?,ncurses?,readline?,sqlite?,ssl?,threads?,tk?,xml?]
+ )"
+
+PROVIDE="virtual/python"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ python_pkg_setup
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if ! tc-is-cross-compiler; then
+ rm "${WORKDIR}/${MY_PV}"/*_all_crosscompile.patch
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${MY_PV}"
+
+ # Avoid regeneration, which would not change contents of files.
+ touch Include/Python-ast.h Python/Python-ast.c
+
+ 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@@"
+
+ if ! use wininst; then
+ # Remove Microsoft Windows executables.
+ rm Lib/distutils/command/wininst-*.exe
+ fi
+
+ # Fix OtherFileTests.testStdin() not to assume
+ # that stdin is a tty for bug #248081.
+ sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ # Disable extraneous modules with extra dependencies.
+ if use build; then
+ export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat"
+ export PYTHON_DISABLE_SSL="1"
+ else
+ local disable
+ 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+=" _elementtree pyexpat" # _elementtree uses 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
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -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/python3.X/config/Makefile.
+ tc-export CXX
+
+ # Set LDFLAGS so we link modules with -lpython3.1 correctly.
+ # Needed on FreeBSD unless Python 3.1 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ OPT="" econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $(use_with wide-unicode) \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --with-system-ffi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ if ! use threads; then
+ ewarn "Disabling tests due to USE=\"-threads\""
+ return
+ fi
+
+ # Byte compiling should be enabled here.
+ # Otherwise test_import fails.
+ python_enable_pyc
+
+ # Skip failing tests.
+ local skip_tests="distutils"
+
+ # 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
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ EXTRATESTOPTS="-w" emake test
+ local result="$?"
+
+ 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 would like to run them, you may:"
+ elog "cd '${EPREFIX}$(python_get_libdir)/test'"
+ elog "and run the tests separately."
+
+ python_disable_pyc
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" altinstall || die "emake altinstall failed"
+ python_clean_installation_image -q
+
+ mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc3" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle3" "${ED}usr/bin/idle${SLOT}"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ if use build; then
+ rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,sqlite3,test,tkinter}
+ else
+ use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/test"
+ use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,tkinter,test/test_tk*}
+ fi
+
+ use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing"
+
+ prep_ml_includes $(python_get_includedir)
+
+ dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed"
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}/Tools" || die "doins failed"
+ fi
+
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ eselect python update --python3 || eselect python update
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
+
+ if [[ "$(eselect python show)" == "python2."* ]]; then
+ ewarn
+ ewarn "WARNING!"
+ ewarn "Many Python modules have not been ported yet to Python 3.*."
+ ewarn "Python 3 has not been activated and Python wrapper is still configured to use Python 2."
+ ewarn "You can manually activate Python ${SLOT} using \`eselect python set python${SLOT}\`."
+ ewarn "It is recommended to currently have Python wrapper configured to use Python 2."
+ ewarn "Having Python wrapper configured to use Python 3 is unsupported."
+ ewarn
+ fi
+
+ 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
+
+ local n
+ for ((n = 0; n < 12; n++)); do
+ echo -ne "\a"
+ sleep 1
+ done
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+
+ python_mod_cleanup $(python_get_libdir)
+}