public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCH] distutils-r1: Stub-out ez_setup.py and distribute_setup.py
@ 2013-07-09  2:04 Mike Gilbert
  0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2013-07-09  2:04 UTC (permalink / raw
  To: Gentoo Python

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

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.

[-- Attachment #2: distutils-r1-ez_setup.patch --]
[-- Type: text/x-patch, Size: 1368 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-09 22:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09  2:04 [gentoo-python] [PATCH] distutils-r1: Stub-out ez_setup.py and distribute_setup.py Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox