[Reproducible-builds] [dh-python] 113/183: dd {package} to supported variables in command templates

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Sep 19 15:30:27 UTC 2014


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

lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.

commit 6e7cc9703c7bb1ae063a6b8e896af7ef5d6ed5ee
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Mon Sep 2 18:46:15 2013 +0200

    dd {package} to supported variables in command templates
---
 debian/changelog | 1 +
 pybuild          | 7 ++++++-
 pybuild.rst      | 4 ++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f5d2945..9e7bab3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 dh-python (1.20130902-1) unstable; urgency=low
 
   * Fix DESTDIR guessing (from --name) for non-default interpreter versions
+  * Add {package} to supported variables in command templates
 
  -- Piotr Ożarowski <piotr at debian.org>  Mon, 02 Sep 2013 18:22:14 +0200
 
diff --git a/pybuild b/pybuild
index 155fbcb..c9f2179 100755
--- a/pybuild
+++ b/pybuild
@@ -127,12 +127,17 @@ def main(cfg):
 
         ipreter = Interpreter(i)
         destdir = context['destdir'].format(version=version, interpreter=i)
+        if cfg.name:
+            package = ipreter.suggest_pkg_name(cfg.name)
+        else:
+            package = 'PYBUILD_NAME_not_set'
         if cfg.name and destdir.rstrip('/').endswith('debian/tmp'):
-            destdir = "debian/{}".format(ipreter.suggest_pkg_name(cfg.name))
+            destdir = "debian/{}".format(package)
         destdir = abspath(destdir)
 
         args = dict(context['args'])
         args.update({
+            'package': package,
             'interpreter': ipreter,
             'version': version,
             'args': get_option("%s_args" % step, interpreter, version, ''),
diff --git a/pybuild.rst b/pybuild.rst
index b4b9993..b214ac7 100644
--- a/pybuild.rst
+++ b/pybuild.rst
@@ -115,6 +115,10 @@ variables that can be used in `ARGUMENTS` and `COMMAND`
   (.pybuild/interpreter_version/ by default),
 * `{build_dir}` will be replaced with build directory
 * `{install_dir}` will be replaced with install directory.
+* `{package}` will be replaced with suggested package name,
+  if --name (or PYBUILD_NAME) is set to `foo`, this variable
+  will be replaced to `python-foo`, `python3-foo` or `pypy-foo`
+  depending on interpreter which is used in given iteration.
 
 DIRECTORIES
 -----------

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



More information about the Reproducible-builds mailing list