public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-python] [PATCH] Override egg-info location in out-of-source builds.
@ 2013-02-09 12:03 Michał Górny
  2013-02-09 15:57 ` [gentoo-python] " Mike Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2013-02-09 12:03 UTC (permalink / raw
  To: gentoo-python; +Cc: python, Michał Górny

Detect whether egg_info command is available and override the egg-info
file location to BUILD_DIR. This way, there is no risk that egg-info
files between CPython 2.7 and PyPy will collide. Even if that wouldn't
hurt anything :P.
---
 gx86/eclass/distutils-r1.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 27730f5..24589f0 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -215,6 +215,13 @@ esetup.py() {
 			die 'Out-of-source build requested, yet BUILD_DIR unset.'
 		fi
 
+		# if setuptools is used, adjust egg_info path as well
+		if "${PYTHON:-python}" setup.py --help egg_info &>/dev/null; then
+			add_args+=(
+				egg_info --egg-base "${BUILD_DIR}"
+			)
+		fi
+
 		add_args+=(
 			build
 			--build-base "${BUILD_DIR}"
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-09 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09 12:03 [gentoo-python] [PATCH] Override egg-info location in out-of-source builds Michał Górny
2013-02-09 15:57 ` [gentoo-python] " Mike Gilbert

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