[jhbuild/wip/destdir: 4/10] distutils: support DESTDIR install
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/destdir: 4/10] distutils: support DESTDIR install
- Date: Thu, 16 Jun 2011 00:25:15 +0000 (UTC)
commit a5f78879d4022f485c6f149e5104e9ab2ecd4af8
Author: Colin Walters <walters verbum org>
Date: Tue May 24 16:35:56 2011 -0400
distutils: support DESTDIR install
This follows from the similar autotools work.
https://bugzilla.gnome.org/show_bug.cgi?id=647231
jhbuild/modtypes/distutils.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/modtypes/distutils.py b/jhbuild/modtypes/distutils.py
index bed6b47..d4d56a1 100644
--- a/jhbuild/modtypes/distutils.py
+++ b/jhbuild/modtypes/distutils.py
@@ -43,6 +43,7 @@ class DistutilsModule(Package, DownloadableModule):
Package.__init__(self, name, dependencies, after, suggests)
self.branch = branch
self.supports_non_srcdir_builds = supports_non_srcdir_builds
+ self.supports_install_destdir = True
def get_srcdir(self, buildscript):
return self.branch.srcdir
@@ -71,13 +72,16 @@ class DistutilsModule(Package, DownloadableModule):
buildscript.set_action(_('Installing'), self)
srcdir = self.get_srcdir(buildscript)
builddir = self.get_builddir(buildscript)
+ destdir = self.prepare_installroot(buildscript)
python = os.environ.get('PYTHON', 'python')
cmd = [python, 'setup.py']
if srcdir != builddir:
cmd.extend(['build', '--build-base', builddir])
- cmd.extend(['install', '--prefix', buildscript.config.prefix])
+ cmd.extend(['install',
+ '--prefix', buildscript.config.prefix,
+ '--root', destdir])
buildscript.execute(cmd, cwd = srcdir, extra_env = self.extra_env)
- buildscript.packagedb.add(self.name, self.get_revision() or '')
+ self.process_install(buildscript, self.get_revision())
do_install.depends = [PHASE_BUILD]
def xml_tag_and_attrs(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]