Remove old python version from tree

We have forked ebuilds of newer versions of python in chromiumos-overlay,
so this package has no place in portage-stable.

TEST=None
BUG=None

Change-Id: I1db2d6238432da40f870bee31ed11fe64c41f697
Reviewed-on: https://chromium-review.googlesource.com/1760968
Tested-by: Chris McDonald <cjmcdonald@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
deleted file mode 100644
index d298190..0000000
--- a/dev-lang/python/Manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-DIST Python-3.3.5.tar.xz 12116308 SHA256 abe99b484434503d8b23be0f243ec27139e743a4798cd71c1dce3cf40e63b6e5 SHA512 562ebd85291f29ff18d37f05682763fc45aa9d070688006f4ef5c89392a48022357c3ca9ee1d795e9e863bdef413e6bab77b8d65581d374a76dbe7cacec65550 WHIRLPOOL f4b6010d32b28b7bb038cbb7c5f98d325cc4253fd1be9a0a1089ed6fd7dd414c5169931d21ef819137d5c1084517a650828f260cf2a1d8ce871bc67aeef3fff8
-DIST python-gentoo-patches-3.3.5-0.tar.xz 12892 SHA256 a7240de9598033cb40f8f273d8104d4e2b1dcaea028d45ac28efaa3c680ff6f7 SHA512 27eef4c2b3f631b000db3f6a5c426d9b498d63a08fe82b1ab7c2c010fb72208109461a5f008d47703852526655b70a734ea95be8742897026db5750bb9cc9d16 WHIRLPOOL edab9222d7da94cab3b1de0e1a27c6c7dbd49194b813a0a1cf9e532063029c4e4f19151c9f4878eeabed3168ff1f97eae7f008280c7ed2897fc14c5516c68d7e
diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf
deleted file mode 100644
index 20e3628..0000000
--- a/dev-lang/python/files/pydoc.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-# /etc/init.d/pydoc.conf
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.conf,v 1.3 2011/10/27 13:56:55 neurogeek Exp $
-
-# This file contains the configuration for pydoc's internal webserver.
-
-# Default port for Python's pydoc server.
-@PYDOC_PORT_VARIABLE@="7464"
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init
deleted file mode 100755
index 0d62dfc..0000000
--- a/dev-lang/python/files/pydoc.init
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public Licence v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.4 2011/10/27 13:56:55 neurogeek Exp $
-
-depend() {
-	need net
-}
-
-start() {
-	local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}"
-
-	if [ -z "${pydoc_port}" ]; then
-		eerror "Port not set"
-		return 1
-	fi
-
-	ebegin "Starting pydoc server on port ${pydoc_port}" 
-	start-stop-daemon --start --background --make-pidfile \
-			  --pidfile /var/run/@PYDOC@.pid \
-			  --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}"
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping pydoc server"
-	start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid
-	eend $?
-}
diff --git a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch b/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
deleted file mode 100644
index c67b2e5..0000000
--- a/dev-lang/python/files/python-3.3-CVE-2014-4616.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1397441438 14400
-# Node ID 50c07ed1743da9cd4540d83de0c30bd17aeb41b0
-# Parent  218e28a935ab4494d05215c243e2129625a71893
-in scan_once, prevent the reading of arbitrary memory when passed a negative index
-
-Bug reported by Guido Vranken.
-
-Index: Python-3.3.5/Lib/json/tests/test_decode.py
-===================================================================
---- Python-3.3.5.orig/Lib/test/test_json/test_decode.py	2014-06-26 18:40:10.825269130 +0200
-+++ Python-3.3.5/Lib/test/test_json/test_decode.py	2014-06-26 18:40:21.962323035 +0200
-@@ -60,5 +60,10 @@
-         msg = 'escape'
-         self.assertRaisesRegexp(ValueError, msg, self.loads, s)
- 
-+    def test_negative_index(self):
-+        d = self.json.JSONDecoder()
-+        self.assertRaises(ValueError, d.raw_decode, 'a'*42, -50000)
-+        self.assertRaises(ValueError, d.raw_decode, u'a'*42, -50000)
-+
- class TestPyDecode(TestDecode, PyTest): pass
- class TestCDecode(TestDecode, CTest): pass
-Index: Python-3.3.5/Misc/ACKS
-===================================================================
---- Python-3.3.5.orig/Misc/ACKS	2014-06-26 18:40:10.826269135 +0200
-+++ Python-3.3.5/Misc/ACKS	2014-06-26 18:40:21.962323035 +0200
-@@ -1085,6 +1085,7 @@
- Frank Visser
- Johannes Vogel
- Alex Volkov
-+Guido Vranken
- Martijn Vries
- Niki W. Waibel
- Wojtek Walczak
-Index: Python-3.3.5/Modules/_json.c
-===================================================================
---- a/Modules/_json.c
-+++ b/Modules/_json.c
-@@ -975,7 +975,10 @@ scan_once_unicode(PyScannerObject *s, Py
-     kind = PyUnicode_KIND(pystr);
-     length = PyUnicode_GET_LENGTH(pystr);
- 
--    if (idx >= length) {
-+    if (idx < 0)
-+        /* Compatibility with Python version. */
-+        idx += length;
-+    if (idx < 0 || idx >= length) {
-         PyErr_SetNone(PyExc_StopIteration);
-         return NULL;
-     }
diff --git a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
deleted file mode 100644
index d963b9e..0000000
--- a/dev-lang/python/files/python-3.3.5-ncurses-pkg-config.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-do not hardcode /usr/include paths
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -668,6 +668,8 @@ AC_ARG_WITH(cxx_main,
- ])
- AC_MSG_RESULT($with_cxx_main)
- 
-+AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-+
- preset_cxx="$CXX"
- if test -z "$CXX"
- then
-@@ -1513,7 +1515,7 @@ dnl AC_MSG_RESULT($cpp_type)
- # checks for header files
- AC_HEADER_STDC
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
- AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
- fcntl.h grp.h \
- ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
-@@ -2225,8 +2227,6 @@ LIBS="$withval $LIBS"
- ],
- [AC_MSG_RESULT(no)])
- 
--AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
--
- # Check for use of the system expat library
- AC_MSG_CHECKING(for --with-system-expat)
- AC_ARG_WITH(system_expat,
-@@ -4273,7 +4273,7 @@ then
- fi
- 
- ac_save_cppflags="$CPPFLAGS"
--CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
-+CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
- # On HP/UX 11.0, mvwdelch is a block with a return statement
- AC_MSG_CHECKING(whether mvwdelch is an expression)
- AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
deleted file mode 100644
index 6a4ebd8..0000000
--- a/dev-lang/python/metadata.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-<maintainer type="project">
-	<email>python@gentoo.org</email>
-	<name>Python</name>
-</maintainer>
-<use>
-	<flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
-	<flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
-	<flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
-</use>
-</pkgmetadata>
diff --git a/dev-lang/python/python-3.3.5-r2.ebuild b/dev-lang/python/python-3.3.5-r2.ebuild
deleted file mode 100644
index 44b2ad6..0000000
--- a/dev-lang/python/python-3.3.5-r2.ebuild
+++ /dev/null
@@ -1,325 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.3.5-r1.ebuild,v 1.11 2015/03/03 06:49:14 vapier Exp $
-
-EAPI="4"
-WANT_AUTOMAKE="none"
-WANT_LIBTOOL="none"
-
-inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
-
-MY_P="Python-${PV}"
-PATCHSET_VERSION="${PV}-0"
-
-DESCRIPTION="An interpreted, interactive, object-oriented programming language"
-HOMEPAGE="http://www.python.org/"
-SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
-	http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz
-	mirror://gentoo/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
-
-LICENSE="PSF-2"
-SLOT="3.3"
-KEYWORDS="*"
-IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk wininst +xml"
-
-# Do not add a dependency on dev-lang/python to this ebuild.
-# If you need to apply a patch which requires python for bootstrapping, please
-# run the bootstrap code on your dev box and include the results in the
-# patchset. See bug 447752.
-
-RDEPEND="app-arch/bzip2
-	app-arch/xz-utils
-	>=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 )
-		ssl? ( dev-libs/openssl )
-		tk? (
-			>=dev-lang/tk-8.0
-			dev-tcltk/blt
-			dev-tcltk/tix
-		)
-		xml? ( >=dev-libs/expat-2.1 )
-	)
-	!!<sys-apps/sandbox-2.6-r1"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	>=sys-devel/autoconf-2.65
-	!sys-devel/gcc[libffi]"
-RDEPEND+=" !build? ( app-misc/mime-types )
-	doc? ( dev-python/python-docs:${SLOT} )"
-PDEPEND="app-eselect/eselect-python
-	app-admin/python-updater"
-
-S="${WORKDIR}/${MY_P}"
-
-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
-		# Invokes BUILDPYTHON, which is built for the host arch
-		local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
-	fi
-
-	EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
-	epatch "${FILESDIR}/${PN}-3.3.5-ncurses-pkg-config.patch"
-
-	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@@"
-
-	# Disable ABI flags.
-	sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed"
-
-	# bug #514686
-	epatch "${FILESDIR}/${PN}-3.3-CVE-2014-4616.patch"
-
-	epatch_user
-
-	eautoconf
-	eautoheader
-}
-
-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
-
-	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
-	tc-export CXX
-	# The configure script fails to use pkg-config correctly.
-	# http://bugs.python.org/issue15506
-	export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
-
-	# 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
-
-	BUILD_DIR="${WORKDIR}/${CHOST}"
-	mkdir -p "${BUILD_DIR}" || die
-	cd "${BUILD_DIR}" || die
-
-	ECONF_SOURCE="${S}" OPT="" \
-	econf \
-		--with-fpectl \
-		--enable-shared \
-		$(use_enable ipv6) \
-		$(use_with threads) \
-		--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
-
-	if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
-		eerror "configure has detected that the sem_open function is broken."
-		eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
-		die "Broken sem_open function (bug 496328)"
-	fi
-}
-
-src_compile() {
-	# Avoid invoking pgen for cross-compiles.
-	touch Include/graminit.h Python/graminit.c || die
-
-	cd "${BUILD_DIR}" || die
-	emake CPPFLAGS="" CFLAGS="" LDFLAGS=""
-
-	# Work around bug 329499. See also bug 413751 and 457194.
-	if has_version dev-libs/libffi[pax_kernel]; then
-		pax-mark E python
-	else
-		pax-mark m python
-	fi
-}
-
-src_test() {
-	# Tests will not work when cross compiling.
-	if tc-is-cross-compiler; then
-		elog "Disabling tests due to crosscompiling."
-		return
-	fi
-
-	cd "${BUILD_DIR}" || die
-
-	# Skip failing tests.
-	local skipped_tests="gdb"
-
-	for test in ${skipped_tests}; do
-		mv "${S}"/Lib/test/test_${test}.py "${T}"
-	done
-
-	PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty
-	local result="$?"
-
-	for test in ${skipped_tests}; do
-		mv "${T}/test_${test}.py" "${S}"/Lib/test
-	done
-
-	elog "The following tests have been skipped:"
-	for test in ${skipped_tests}; do
-		elog "test_${test}.py"
-	done
-
-	elog "If you would like to run them, you may:"
-	elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
-	elog "and run the tests separately."
-
-	if [[ "${result}" -ne 0 ]]; then
-		die "emake test failed"
-	fi
-}
-
-src_install() {
-	local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
-
-	cd "${BUILD_DIR}" || die
-
-	emake DESTDIR="${D}" altinstall
-
-	sed \
-		-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
-		-e "s/\(PY_LDFLAGS=\).*/\1/" \
-		-i "${libdir}/config-${SLOT}/Makefile" || die "sed failed"
-
-	# Backwards compat with Gentoo divergence.
-	dosym python${SLOT}-config /usr/bin/python-config-${SLOT}
-
-	# Fix collisions between different slots of Python.
-	rm -f "${ED}usr/$(get_libdir)/libpython3.so"
-
-	if use build; then
-		rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter}
-	else
-		use elibc_uclibc && rm -fr "${libdir}/test"
-		use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
-		use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
-	fi
-
-	use threads || rm -fr "${libdir}/multiprocessing"
-	use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
-
-	dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
-
-	if use examples; then
-		insinto /usr/share/doc/${PF}/examples
-		find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
-		doins -r "${S}"/Tools
-	fi
-	insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
-	local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
-		emake --no-print-directory -s -f - 2>/dev/null)
-	newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
-
-	newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
-	newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
-	sed \
-		-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
-		-e "s:@PYDOC@:pydoc${SLOT}:" \
-		-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
-
-	# for python-exec
-	python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR
-
-	# if not using a cross-compiler, use the fresh binary
-	if ! tc-is-cross-compiler; then
-		local PYTHON=./python
-		local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
-	fi
-
-	echo "EPYTHON='${EPYTHON}'" > epython.py
-	python_domodule epython.py
-}
-
-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
-
-	if [[ "${python_updater_warning}" == "1" ]]; then
-		ewarn "You have just upgraded from an older version of Python."
-		ewarn
-		ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
-		ewarn
-		ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules."
-	fi
-}
-
-pkg_postrm() {
-	eselect_python_update
-}