← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~gary/launchpad/bzrbin into lp:launchpad/devel

 

Gary Poster has proposed merging lp:~gary/launchpad/bzrbin into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


This adds a bzr command to the bin directory, per the discussion on the mailing list with jam, jml and myself.
-- 
https://code.launchpad.net/~gary/launchpad/bzrbin/+merge/41770
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~gary/launchpad/bzrbin into lp:launchpad/devel.
=== added file 'buildout-templates/bin/bzr.in'
--- buildout-templates/bin/bzr.in	1970-01-01 00:00:00 +0000
+++ buildout-templates/bin/bzr.in	2010-11-24 17:33:27 +0000
@@ -0,0 +1,15 @@
+#!${buildout:executable} -S
+
+# Initialize our paths.
+${python-relative-path-setup}
+import sys
+sys.path.insert(0, ${scripts:parts-directory|path-repr})
+import site
+
+# Run the script.
+import pkg_resources
+
+bzr_distribution = pkg_resources.get_distribution(
+    pkg_resources.Requirement.parse('bzr'))
+
+bzr_distribution.run_script('bzr', globals().copy())