Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH distutils-r1 4/6] Install files to intermediate root and merge afterwards.
Date: Thu, 29 Nov 2012 11:30:43
Message-Id: 1354188694-7229-5-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] distutils-r1: a bit of clean up + parallel builds by "Michał Górny"
1 This will allow us to install wrapper in distutils-r1_rename_scripts
2 without interfering with distutils' no-clobber behavior. In future it
3 will also make it possible to run install in parallel.
4 ---
5 gx86/eclass/distutils-r1.eclass | 9 +++++++--
6 1 file changed, 7 insertions(+), 2 deletions(-)
7
8 diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
9 index e1e89c6..fffa800 100644
10 --- a/gx86/eclass/distutils-r1.eclass
11 +++ b/gx86/eclass/distutils-r1.eclass
12 @@ -297,9 +297,14 @@ distutils-r1_python_install() {
13 local PYTHONDONTWRITEBYTECODE
14 export PYTHONDONTWRITEBYTECODE
15
16 - esetup.py install "${flags[@]}" --root="${D}" "${@}"
17 + local root=${D}/_${EPYTHON}
18
19 - _distutils-r1_rename_scripts "${D}"
20 + esetup.py install "${flags[@]}" --root="${root}" "${@}"
21 + _distutils-r1_rename_scripts "${root}"
22 +
23 + # merge
24 + cp -a -l -n "${root}"/* "${D}"/ || die "Merging ${EPYTHON} image failed."
25 + rm -rf "${root}"
26 }
27
28 # @FUNCTION: distutils-r1_python_install_all
29 --
30 1.8.0