Version bump python to 3.2.2.
authorDirkjan Ochtman <djc@gentoo.org>
Fri, 16 Sep 2011 20:47:06 +0000 (20:47 +0000)
committerDirkjan Ochtman <djc@gentoo.org>
Fri, 16 Sep 2011 20:47:06 +0000 (20:47 +0000)
Package-Manager: portage-2.1.10.15/cvs/Linux x86_64

dev-lang/python/ChangeLog
dev-lang/python/Manifest
dev-lang/python/python-3.2.2.ebuild [new file with mode: 0644]

index e6b052f9b0f070346f2ee65a9df508dae55b25b6..cb96d5fbfb647e0edb4762e09ba58a1b6697064b 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-lang/python
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.546 2011/09/16 13:34:12 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.547 2011/09/16 20:47:06 djc Exp $
+
+*python-3.2.2 (16 Sep 2011)
+
+  16 Sep 2011; Dirkjan Ochtman <djc@gentoo.org> +python-3.2.2.ebuild:
+  Version bump to 3.2.2 (fixes bug 375051).
 
 *python-3.1.4-r3 (16 Sep 2011)
 *python-2.7.2-r3 (16 Sep 2011)
index 7c542812abeb59a1b9e814c84820be5d2b627d9d..b530e80755dd080d2bfba4f77c4c04e7b5dc17e2 100644 (file)
@@ -18,6 +18,7 @@ DIST Python-2.7.1.tar.bz2 11722546 RMD160 3ce59305f6cd3fb320a53771d0ea01ec068700
 DIST Python-2.7.2.tar.bz2 11754834 RMD160 c3bf4f09b7c429a4d9f4cc251c795304cd5232c5 SHA1 417bdeea77abfaf1b9257fc6b4a04aaa209f4547 SHA256 5057eb067eb5b5a6040dbd0e889e06550bde9ec041dadaa855ee9490034cbdab
 DIST Python-3.1.3.tar.bz2 9875464 RMD160 730f3b8eb1a41f1b7c469fc81be734bb802cb9f9 SHA1 aeadf1eb7f450aab77a8972c042bc5f49bcf2288 SHA256 77f6f41a51be4ca85d83670405c8281dd1237bb00d8be8a7560cb3ccdf5558cb
 DIST Python-3.1.4.tar.xz 8184052 RMD160 beb24a2a1227aa2bc036263b4c808daa72fa3e02 SHA1 e5767a4fc92433816451de75c8721f2e1a81f6ea SHA256 21aa936b3989a8e32ba17799fcf235e0979a2e1c95e70bcd3bc066185a559afc
+DIST Python-3.2.2.tar.xz 8923224 RMD160 f28dc7a6b8a6ed1cc359791b1c70367d36ae0af3 SHA1 5e654dbd48476193ccdef4d604ed4f45b48c6769 SHA256 1072d13d846373e7eaa4f94c21f0985d2965e916ff1096abe72d1af67c5f55f9
 DIST Python-3.2.tar.xz 8877208 RMD160 25e958dbb17223d6c2060520e0921e6d9c9f7906 SHA1 55a3a9d39f31563370d0c494373bb6d38e4d1a00 SHA256 38a3de4ed38e92e1c3dd81e230caf6569d41bf8df6537d099541a6d3dca1b132
 DIST python-gentoo-patches-2.4.6.tar.bz2 10983 RMD160 c06dc76edec86d708a0c0e37126ae50f49f61bd3 SHA1 bbc04083fe74cff8c723c5c3cab70b1b814c987f SHA256 0508a66408f218c655823303833599344d2edeec1ffc683c6ada3fc33731590d
 DIST python-gentoo-patches-2.5.4-r3.tar.bz2 19473 RMD160 c3a807693103f9e26c3cce4add5a1f3d975ef216 SHA1 c6170894865ee8aac8c813916c21a0d0458691bc SHA256 03f5bdb0a4ac8eb498a90c5cd444a5c76ed7e79bff5e8dca00efe77cf80c6391
@@ -27,6 +28,7 @@ DIST python-gentoo-patches-2.7.1-r1.tar.bz2 13384 RMD160 d79de2520244a8b9c5de61c
 DIST python-gentoo-patches-2.7.2.tar.bz2 14485 RMD160 6b66705d61b525d0089326ddb700ad3c5ad6e23e SHA1 94fc9b00cc7e7c60cce41640dc09fd2395a5c5d9 SHA256 29616ce50244c0f7c85b903dcb939d656bfd9d5e8a930d90bff6cf878f3ac5a5
 DIST python-gentoo-patches-3.1.3-r1.tar.bz2 13730 RMD160 73f922d850e464e589c7a3cfb8f755d36167d156 SHA1 9228b63c980b80dd7e8dd9e0276c29af18692e33 SHA256 f23056436b298ed0ff9823b52902aaaa63eae0c4585a4a19e47571685127631e
 DIST python-gentoo-patches-3.1.4.tar.bz2 12930 RMD160 5ba5d20e065e6c346848d0c3ed12d65cd6b089be SHA1 b6bb595e03a78a87e3164874a9a12711bee4b9f8 SHA256 9800f3a9989c8aac4c96a7e6411baf96af0c18c041627a330681783a84cb4316
+DIST python-gentoo-patches-3.2.2.tar.bz2 10834 RMD160 f1ca3bec5705b72ee488a37ea71dc7110b4495f1 SHA1 c5daaea3c52a564228c84be741da6cf039b10e19 SHA256 521c1bd7c360fb66788e7c5e191497e014bb104f2ef2272d99a40b764082d7cb
 DIST python-gentoo-patches-3.2.tar.bz2 11826 RMD160 8d450939f3f2f7f5c779b8701097fcf92909c36b SHA1 bdc922a4b94bbb616dbf702e913f74984ad8bda5 SHA256 43799206ed8c81936e3b3e68e8c562334b346652d30383c5b7b93fe9741ad0db
 EBUILD python-2.4.6.ebuild 9314 RMD160 de356959ee97e81f345a595066d6400c7a505461 SHA1 b4c771a3876343087928d8d7a786fe017ea40189 SHA256 f36f2dc2cc7fee7fdc03338c9b1a98134e326cb7149eab030eb7632bf64f80a7
 EBUILD python-2.5.4-r4.ebuild 9664 RMD160 6da8e6907b3c0675a560952cc45372ec56f419fd SHA1 7d43770dbeabbd0a19bc006bd2bf5187bf84ca68 SHA256 fda530914fba4f8bb4010e6b84c3feee3bf9d5654a808e66c7541038c1d972a2
@@ -39,12 +41,13 @@ EBUILD python-3.1.3-r1.ebuild 9797 RMD160 64b5953182ffe6a47dee1d7e3cb5bcec0d7b13
 EBUILD python-3.1.4-r2.ebuild 10705 RMD160 2f5657114d086c4546da85f344b322322bbb80c6 SHA1 c74f64d33d14d7db0fc9bada4107e98a6b73e6a8 SHA256 5e1bdf76fa395d8e96e3df13e2f7abc662afa4443ddbdcba3ba8c452a0312009
 EBUILD python-3.1.4-r3.ebuild 10734 RMD160 19b9ee818794d50396db8018a2ec1173bdec6946 SHA1 462587b269b8f2d3cbdbc3ac25a0c6507c381017 SHA256 73cf8008779f8211a3281b2b31b2857bbba7f8f0b170e5b10b3f2ecd6fc36ebb
 EBUILD python-3.2-r2.ebuild 10773 RMD160 c9382c6da7738936c57461909a3eb16c74f171a4 SHA1 27d961b9fe9676d68bac0603e63d4f4b6d35ca99 SHA256 f98e550068b32d2526b3d8e487da74e4b2572bf388587f03a3b36942a9657c1d
-MISC ChangeLog 97993 RMD160 f63e61e8d6b05f516c27bec36f93aaf4de7b130e SHA1 e292ed0bb6e83e68a5c2452ac9f7ab43f799a9e3 SHA256 ecc6c3e9ba289962f970ca7b8acf0c78f7ffb0c9979bf3c112801250ea8e74be
+EBUILD python-3.2.2.ebuild 10673 RMD160 f4cd0d4f871774d4f529b207000676e5367d88f0 SHA1 aafc517a6d3d6d7e36aeda2630c4c8497773efca SHA256 0157459cd721e33a72b66a67120064ccc356939544e9a3941059dbc48fb965cd
+MISC ChangeLog 98137 RMD160 0d5249260a5b2039b8422892f5850c91eef4f132 SHA1 dc1d6e3be5f8a2c715601f632421d05c3326ceb5 SHA256 daf46e577ed4cbf1f8671f1db1199621165dde37844ebfacde58e1f136d0b725
 MISC metadata.xml 661 RMD160 54831d16b8807086bfabdbb3df9d33336b5d42a0 SHA1 9867c337fe9e6f4e967004fc9409763e0fedf43b SHA256 2c6c3407251f7ccd6501dee49494e539a9544f2fbae99a4373eefdf4e83e8908
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
-iEYEAREKAAYFAk5zUF8ACgkQxeMuLWsGW/ufKgCfZE0vCrBfm5DpzVx+XP7+n/NS
-gzQAnRX3ocZEtXuLJp8Qo5npqjwwr47W
-=fCKN
+iEYEAREKAAYFAk5ztdYACgkQxeMuLWsGW/tdBgCdG48e9di80EKYh1nvCdob0Yyx
+fPQAn3wT+sew9U1mZSsuwo38+DaDGzFQ
+=M27b
 -----END PGP SIGNATURE-----
diff --git a/dev-lang/python/python-3.2.2.ebuild b/dev-lang/python/python-3.2.2.ebuild
new file mode 100644 (file)
index 0000000..75a950d
--- /dev/null
@@ -0,0 +1,359 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.2.2.ebuild,v 1.1 2011/09/16 20:47:06 djc Exp $
+
+EAPI="3"
+WANT_AUTOMAKE="none"
+
+inherit autotools eutils flag-o-matic multilib python toolchain-funcs
+
+if [[ "${PV}" == *_pre* ]]; then
+       inherit subversion
+
+       ESVN_PROJECT="python"
+       ESVN_REPO_URI="http://svn.python.org/projects/python/branches/release32-maint"
+       ESVN_REVISION=""
+else
+       MY_PV="${PV%_p*}"
+       MY_P="Python-${MY_PV}"
+fi
+
+PATCHSET_REVISION="0"
+
+DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language."
+HOMEPAGE="http://www.python.org/"
+if [[ "${PV}" == *_pre* ]]; then
+       SRC_URI=""
+else
+       SRC_URI="http://www.python.org/ftp/python/${MY_PV}/${MY_P}.tar.xz
+               mirror://gentoo/python-gentoo-patches-${MY_PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2"
+fi
+
+LICENSE="PSF-2"
+SLOT="3.2"
+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.3.8:3[extensions] )
+                       ssl? ( dev-libs/openssl )
+                       tk? (
+                               >=dev-lang/tk-8.0
+                               dev-tcltk/blt
+                       )
+                       xml? ( >=dev-libs/expat-2 )
+               )"
+DEPEND=">=sys-devel/autoconf-2.65
+               ${RDEPEND}
+               $([[ "${PV}" == *_pre* ]] && echo "=${CATEGORY}/${PN}-${PV%%.*}*")
+               $([[ "${PV}" != *_pre* ]] && echo "app-arch/xz-utils")
+               dev-util/pkgconfig
+               $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] && echo "doc? ( dev-python/sphinx )")
+               !sys-devel/gcc[libffi]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+               $([[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+_pre ]] || echo "doc? ( dev-python/python-docs:${SLOT} )")"
+PDEPEND="app-admin/python-updater"
+
+if [[ "${PV}" != *_pre* ]]; then
+       S="${WORKDIR}/${MY_P}"
+fi
+
+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 [[ "${PV}" =~ ^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+_pre ]]; then
+               if grep -Eq '#define PY_RELEASE_LEVEL[[:space:]]+PY_RELEASE_LEVEL_FINAL' Include/patchlevel.h; then
+                       # Update micro version, release level and version string.
+                       local micro_version="${PV%_pre*}"
+                       micro_version="${micro_version##*.}"
+                       local version_string="${PV%.*}.$((${micro_version} - 1))+"
+                       sed \
+                               -e "s/\(#define PY_MICRO_VERSION[[:space:]]\+\)[^[:space:]]\+/\1${micro_version}/" \
+                               -e "s/\(#define PY_RELEASE_LEVEL[[:space:]]\+\)[^[:space:]]\+/\1PY_RELEASE_LEVEL_ALPHA/" \
+                               -e "s/\(#define PY_VERSION[[:space:]]\+\"\)[^\"]\+\(\"\)/\1${version_string}\2/" \
+                               -i Include/patchlevel.h || die "sed failed"
+               fi
+       fi
+
+       local excluded_patches
+       if ! tc-is-cross-compiler; then
+               excluded_patches="*_all_crosscompile.patch"
+       fi
+
+       local patchset_dir
+       if [[ "${PV}" == *_pre* ]]; then
+               patchset_dir="${FILESDIR}/${SLOT}-${PATCHSET_REVISION}"
+       else
+               patchset_dir="${WORKDIR}/${MY_PV}"
+       fi
+
+       EPATCH_EXCLUDE="${excluded_patches}" EPATCH_SUFFIX="patch" epatch "${patchset_dir}"
+
+       #Linux-3 compat. Bug #374579 (upstream issue12571)
+       if use kernel_linux; then
+               cp -r "${S}/Lib/plat-linux2" "${S}/Lib/plat-linux3" || die "copy plat-linux failed"
+       fi
+
+       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
+
+       # Support versions of Autoconf other than 2.65.
+       sed -e "/version_required(2\.65)/d" -i configure.in || die "sed failed"
+
+       # Disable ABI flags.
+       sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.in || die "sed failed"
+
+       if [[ "${PV}" == *_pre* ]]; then
+               sed -e "s/\(-DSVNVERSION=\).*\( -o\)/\1\\\\\"${ESVN_REVISION}\\\\\"\2/" -i Makefile.pre.in || die "sed failed"
+       fi
+
+       eautoreconf
+}
+
+src_configure() {
+       if use build; then
+               # Disable extraneous modules with extra dependencies.
+               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.2 correctly.
+       # Needed on FreeBSD unless Python 3.2 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="" \
+               --enable-loadable-sqlite-extensions \
+               --with-system-expat \
+               --with-system-ffi
+}
+
+src_compile() {
+       emake EPYTHON="python${PV%%.*}" CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed"
+}
+
+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"
+
+       for test in ${skip_tests}; do
+               mv "${S}/Lib/test/test_${test}.py" "${T}"
+       done
+
+       # Rerun failed tests in verbose mode (regrtest -w).
+       emake test EXTRATESTOPTS="-w" CPPFLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
+       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
+
+       sed \
+               -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+               -e "s/\(PY_LDFLAGS=\).*/\1/" \
+               -i "${ED}$(python_get_libdir)/config-${SLOT}/Makefile" || die "sed failed"
+
+       mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}"
+
+       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"
+
+       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
+
+       newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed"
+       newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed"
+
+       if use kernel_linux; then
+               if [ -d "${ED}$(python_get_libdir)/plat-linux2" ];then
+                       cp -r "${ED}$(python_get_libdir)/plat-linux2" \
+                               "${ED}$(python_get_libdir)/plat-linux3" || die "copy plat-linux failed"
+               else
+                       cp -r "${ED}$(python_get_libdir)/plat-linux3" \
+                               "${ED}$(python_get_libdir)/plat-linux2" || die "copy plat-linux failed"
+               fi
+       fi
+
+       sed -e "s:@PYDOC@:pydoc${SLOT}:" -i "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+}
+
+pkg_preinst() {
+       if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then
+               python_updater_warning="1"
+       fi
+}
+
+eselect_python_update() {
+       if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+               eselect python update
+       fi
+
+       if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+               eselect python update --python${PV%%.*}
+       fi
+}
+
+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
+
+               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)
+}