From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-python+bounces-484-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (unknown [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id E13B21381F3
	for <garchives@archives.gentoo.org>; Tue,  9 Jul 2013 22:58:45 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7B86AE0B92;
	Tue,  9 Jul 2013 22:50:52 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A5D0EE0AF8
	for <gentoo-python@lists.gentoo.org>; Tue,  9 Jul 2013 22:50:41 +0000 (UTC)
Received: from [192.168.1.204] (76-230-137-203.lightspeed.livnmi.sbcglobal.net [76.230.137.203])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: floppym)
	by smtp.gentoo.org (Postfix) with ESMTPSA id C13E333E9A2
	for <gentoo-python@lists.gentoo.org>; Tue,  9 Jul 2013 02:04:48 +0000 (UTC)
Message-ID: <51DB6FBE.7010909@gentoo.org>
Date: Mon, 08 Jul 2013 22:04:46 -0400
From: Mike Gilbert <floppym@gentoo.org>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130629 Thunderbird/17.0.7
Precedence: bulk
List-Post: <mailto:gentoo-python@lists.gentoo.org>
List-Help: <mailto:gentoo-python+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-python+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-python+subscribe@lists.gentoo.org>
List-Id: Discussions centering around the Python ecosystem in Gentoo Linux <gentoo-python.gentoo.org>
X-BeenThere: gentoo-python@gentoo.org
X-BeenThere: gentoo-python@lists.gentoo.org
MIME-Version: 1.0
To: Gentoo Python <gentoo-python@lists.gentoo.org>
Subject: [gentoo-python] [PATCH] distutils-r1: Stub-out ez_setup.py and distribute_setup.py
X-Enigmail-Version: 1.6a1pre
Content-Type: multipart/mixed;
 boundary="------------090105030505010204020200"
X-Archives-Salt: af73dfe5-97b7-4671-bb83-8eb9ac9bc815
X-Archives-Hash: 7e8d88a5dc95b05f97751f6973059b3d

This is a multi-part message in MIME format.
--------------090105030505010204020200
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I have already committed this to resolve bug 476186. I consider this a
regression from distutils.eclass.

Just posting this here in case anyone has any improvements they would
like to make.

--------------090105030505010204020200
Content-Type: text/x-patch;
 name="distutils-r1-ez_setup.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="distutils-r1-ez_setup.patch"

Index: distutils-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- distutils-r1.eclass	21 May 2013 01:31:02 -0000	1.71
+++ distutils-r1.eclass	9 Jul 2013 01:57:07 -0000	1.72
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.71 2013/05/21 01:31:02 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.72 2013/07/09 01:57:07 floppym Exp $
 
 # @ECLASS: distutils-r1
 # @MAINTAINER:
@@ -308,6 +308,12 @@
 	esetup.py "${add_args[@]}"
 }
 
+_disable_ez_setup() {
+	local stub="def use_setuptools(*args, **kwargs): pass"
+	[[ -f ez_setup.py ]] && echo "${stub}" > ez_setup.py
+	[[ -f distribute_setup.py ]] && echo "${stub}" > distribute_setup.py
+}
+
 # @FUNCTION: distutils-r1_python_prepare_all
 # @DESCRIPTION:
 # The default python_prepare_all(). It applies the patches from PATCHES
@@ -330,6 +336,9 @@
 		fi
 	fi
 
+	# Prevent packages from downloading their own copy of setuptools
+	_disable_ez_setup
+
 	if [[ ${DISTUTILS_IN_SOURCE_BUILD} && ! ${DISTUTILS_SINGLE_IMPL} ]]
 	then
 		# create source copies for each implementation

--------------090105030505010204020200--