[Checkins] SVN: keas.build/trunk/ Add ``--directory`` option to ``install``
Adam Groszer
agroszer at gmail.com
Fri Dec 18 05:12:49 EST 2009
Log message for revision 106744:
Add ``--directory`` option to ``install``
Changed:
U keas.build/trunk/CHANGES.txt
U keas.build/trunk/src/keas/build/install.py
-=-
Modified: keas.build/trunk/CHANGES.txt
===================================================================
--- keas.build/trunk/CHANGES.txt 2009-12-18 10:11:03 UTC (rev 106743)
+++ keas.build/trunk/CHANGES.txt 2009-12-18 10:12:48 UTC (rev 106744)
@@ -15,6 +15,8 @@
- Improvement: Add ``--force-svnauth`` option.
+- Improvement: Add ``--directory`` option to ``install``.
+
0.1.6 (2009-11-2)
------------------
Modified: keas.build/trunk/src/keas/build/install.py
===================================================================
--- keas.build/trunk/src/keas/build/install.py 2009-12-18 10:11:03 UTC (rev 106743)
+++ keas.build/trunk/src/keas/build/install.py 2009-12-18 10:12:48 UTC (rev 106744)
@@ -122,7 +122,8 @@
for name in variants:
print ' * ' + name
if not variants:
- logger.error("No variants found, this script only works with variants.")
+ logger.error(
+ "No variants found, this script only works with variants.")
sys.exit(0)
variant = base.getInput('Variant', variants[0], False)
# 3. Get the version of the project.
@@ -149,13 +150,20 @@
url = '%s://%s:%s@%s' % (parts[0], self.options.username,
self.options.password, ''.join(parts[1:]))
- base.do('%s -t %s -%sc %s%s/%s-%s-%s.cfg' %(
+ options = []
+ if self.options.verbose:
+ options.append('-vv')
+
+ if self.options.overrideDir:
+ options.append('buildout:directory=%s' % self.options.overrideDir)
+
+ cfgFile = '%s%s/%s-%s-%s.cfg' % (url, project, project, variant, version)
+
+ base.do('%s -t %s %s -c %s' %(
self.options.buildout,
self.options.timeout,
- "vv" if self.options.verbose else "",
- url,
- project,
- project, variant, version),
+ ' '.join(options),
+ cfgFile),
captureOutput=False)
parser = optparse.OptionParser()
@@ -180,6 +188,11 @@
help="The version of the project to be installed.")
parser.add_option(
+ "--directory", action="store",
+ dest="overrideDir", metavar="FOLDER", default=None,
+ help="Override installation target folder")
+
+parser.add_option(
"-l", "--latest", action="store_true",
dest="latest", default=False,
help="When specified, the latest version will be chosen.")
More information about the checkins
mailing list