[debhelper-devel] [debhelper] 09/12: python_distutils: Derive prefix from app id

Niels Thykier nthykier at moszumanska.debian.org
Sat Jan 20 18:38:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to annotated tag Version_9.20130630co2endless10
in repository debhelper.

commit 6e6e554b01a09e227c4de4e69c3748918bff9692
Author: Dan Nicholson <nicholson at endlessm.com>
Date:   Wed Jul 9 17:48:01 2014 -0700

    python_distutils: Derive prefix from app id
    
    Pass a prefix derived from the app id to setup.py when eos-app is set in
    DEB_BUILD_PROFILES.
    
    [endlessm/eos-shell#2969]
---
 Debian/Debhelper/Buildsystem/python_distutils.pm | 9 ++++++++-
 debian/changelog                                 | 8 ++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index 4795b7c..d3890bd 100644
--- a/Debian/Debhelper/Buildsystem/python_distutils.pm
+++ b/Debian/Debhelper/Buildsystem/python_distutils.pm
@@ -9,7 +9,7 @@ package Debian::Debhelper::Buildsystem::python_distutils;
 
 use strict;
 use Cwd ();
-use Debian::Debhelper::Dh_Lib qw(error);
+use Debian::Debhelper::Dh_Lib qw(error get_buildprofile package_eos_app_id);
 use base 'Debian::Debhelper::Buildsystem';
 
 sub DESCRIPTION {
@@ -185,11 +185,18 @@ sub build {
 sub install {
 	my $this=shift;
 	my $destdir=shift;
+	my $prefix_opt="";
+	if (get_buildprofile("eos-app")) {
+		# Build with the app id of the main package by default
+		my $app_prefix=package_eos_app_id();
+		$prefix_opt="--prefix=/endless/" . $app_prefix;
+	}
 	$this->setup_py("install",
 		"--force",
 		"--root=$destdir",
 		"--no-compile",
 		"-O0",
+		$prefix_opt,
 		@_);
 }
 
diff --git a/debian/changelog b/debian/changelog
index 1ddfcf9..09dbddc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debhelper (9.20130630co2endless7) eos; urgency=low
+
+  * Debian/Debhelper/Buildsystem/python_distutils.pm:
+    - Set a prefix derived from the app id when eos-app is set in
+      DEB_BUILD_PROFILES.
+
+ -- Dan Nicholson <nicholson at endlessm.com>  Wed, 09 Jul 2014 17:48:01 -0700
+
 debhelper (9.20130630co2endless6) eos; urgency=low
 
   * dh_gencontrol: Always add Eos-Appid control field for eos-app profiles.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list