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 1cccaef3576d3ee9fe707ac745b89da81338658b
Author: Piotr Ożarowski <pi...@debian.org>
Date:   Sun Sep 1 02:08:19 2013 +0200

    pybuild: add --name option
---
 debian/changelog |  1 +
 pybuild          | 15 ++++++++++++---
 pybuild.rst      |  4 ++++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 243703e..dc797a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,7 @@ dh-python (1.20130830-1) UNRELEASED; urgency=low
       (if interpreter version matches the default one) - this will force
       distutils to not hardcode interpreter version in shebangs
     - fix problem with relative paths when dh's --sourcedirectory is used
+    - add --name (PYBUILD_NAME) option
   * Disable two tests in test201 dir if /usr/bin/python2.6 is not available
 
   [ Dmitry Shachnev ]
diff --git a/pybuild b/pybuild
index 837b51e..20a2f27 100755
--- a/pybuild
+++ b/pybuild
@@ -124,14 +124,20 @@ def main(cfg):
         home_dir = 
abspath('.pybuild/{}_{}'.format(interpreter.format(version='X.Y'), version))
         build_dir = get_option('build_dir', interpreter, version,
                                default=join(home_dir, 'build'))
+
+        ipreter = Interpreter(i)
+        destdir = context['destdir'].format(version=version, interpreter=i)
+        if cfg.name and destdir.rstrip('/').endswith('debian/tmp'):
+            destdir = "debian/{}".format(ipreter.suggest_pkg_name(cfg.name))
+        destdir = abspath(destdir)
+
         args = dict(context['args'])
         args.update({
-            'interpreter': Interpreter(i),
+            'interpreter': ipreter,
             'version': version,
             'args': get_option("%s_args" % step, interpreter, version, ''),
             'dir': abspath(context['dir'].format(version=version, 
interpreter=i)),
-            'destdir': abspath(context['destdir'].format(
-                version=version, interpreter=i)),
+            'destdir': destdir,
             'build_dir': abspath(build_dir.format(version=version, 
interpreter=i)),
             # versioned dist-packages even for Python 3.X - dh_python3 will 
fix it later
             # (and will have a chance to compare files)
@@ -384,6 +390,9 @@ def parse_args(argv):
                       ' if --ext-destdir is set [default: .so files]')
     dirs.add_argument('--install-dir', action='store', metavar='DIR',
                       help='installation directory [default: 
.../dist-packages]')
+    dirs.add_argument('--name', action='store',
+                      default=environ.get('PYBUILD_NAME'),
+                      help='use this name to guess destination directories')
 
     limit = parser.add_argument_group('LIMITATIONS')
     limit.add_argument('-s', '--system',
diff --git a/pybuild.rst b/pybuild.rst
index c0c9d4a..b4b9993 100644
--- a/pybuild.rst
+++ b/pybuild.rst
@@ -130,6 +130,10 @@ DIRECTORIES
       [default: `\.so(\.[^/]*)?$`]
   --install-dir DIR
       set installation directory [default: .../dist-packages]
+  --name NAME
+      use this name to guess destination directories
+      (depending on interpreter, "foo" sets debian/python-foo,
+      debian/python3-foo, debian/python3-foo-dbg, etc.)
 
 variables that can be used in `DIR`
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to