[Buildbot-devel] [patch] portable pathsep for PYTHONPATH
Kevin Turner
kevin at janrain.com
Wed Aug 2 03:51:22 UTC 2006
oh, there's probably a patch tracker on sf.net, isn't there. should I
be using that?
slave.ShellCommand has a little special case for PYTHONPATH, which is
very useful, but if you specify PYTHONPATH as "foo:bar" in master.cfg
and your windows buildslave wants it to be "foo;bar", you have problems.
The attached patch lets you specify it as ["foo", "bar"] and then pastes
it together with the appropriate os.pathsep on the slave's side,
although you do have to make sure you upgrade *all* your builders if you
do that in your master.cfg, as it is an incompatible change.
...and with that, I actually have buildbot testing our Python libraries
on win32. Hooray!
- Kevin
<shameless_plug>(working on libs to help people with
http://iwantmyopenid.com/bounty )</>
-------------- next part --------------
New patches:
[slave.commands.ShellCommand: handle os.pathsep in PYTHONPATH
Kevin Turner <kevin at janrain.com>**20060802025845
making PYTHONPATH even more of a magic special-case in the environs.
] {
hunk ./buildbot/slave/commands.py 212
- if (self.environ.has_key('PYTHONPATH')
- and environ.has_key('PYTHONPATH')):
- # special case, prepend the builder's items to the existing
- # ones. This will break if you send over empty strings, so
- # don't do that.
- environ['PYTHONPATH'] = (environ['PYTHONPATH']
- + os.pathsep
- + self.environ['PYTHONPATH'])
- # this will proceed to replace the old one
+ if environ.has_key('PYTHONPATH'):
+ ppath = environ['PYTHONPATH']
+ # Need to do os.pathsep translation. We could either do that
+ # by replacing all incoming ':'s with os.pathsep, or by
+ # accepting lists. I like lists better.
+ if not isinstance(ppath, str):
+ # If it's not a string, treat it as a sequence to be
+ # turned in to a string.
+ ppath = os.pathsep.join(ppath)
+
+ if self.environ.has_key('PYTHONPATH'):
+ # special case, prepend the builder's items to the
+ # existing ones. This will break if you send over empty
+ # strings, so don't do that.
+ ppath = ppath + os.pathsep + self.environ['PYTHONPATH']
+
+ environ['PYTHONPATH'] = ppath
+
}
Context:
[docs: add lots of diagrams describing system architecture
warner at lothar.com**20060731082933]
[check for duplicate Scheduler names when loading the config file
warner at lothar.com**20060724220113]
[sample.cfg: simplify the sample BuildFactory
warner at lothar.com**20060721073832]
[docs: add a table of classes that are useful in master.cfg
warner at lothar.com**20060721053134]
[Makefile: add some-apidocs target
warner at lothar.com**20060716033339]
[setup.py: minor comment
warner at lothar.com**20060716033251]
[rearrange sample.cfg into major sections, update manhole example
warner at lothar.com**20060716033100]
[twcompat.py: fix minor typo
warner at lothar.com**20060716005716]
[implement manhole (ssh-based, colorized/line-editing terminal)
warner at lothar.com**20060716005525]
[fix some epydoc issues
warner at lothar.com**20060716000355]
[hush t.p.components.Interface deprecation warnings by using twcompat
warner at lothar.com**20060629174902]
[SVN: add --non-interactive to all spawned commands
warner at lothar.com**20060628200344]
[bot.py: add minor log message
warner at lothar.com**20060628173957]
[scripts.runner: remove obsolete mention of mktap
warner at lothar.com**20060628173739]
[test_steps.py: update to include 'logfiles' argument sent to slave
warner at lothar.com**20060620160753]
[Trial: track Progress from _trial_temp/test.log too
warner at lothar.com**20060620062223]
[step.py: generalize OutputProgressObserver
warner at lothar.com**20060620062111]
[step_twisted.Trial: use logfiles= to get test.log instead of 'cat'
warner at lothar.com**20060620051141]
[LogFileWatcher: oops, make it work from real BuildSteps
warner at lothar.com**20060620050915]
[add support for following multiple LogFiles in a ShellCommand
warner at lothar.com**20060620041718]
[tests: run commands from _trial_temp, not buildbot/test/
warner at lothar.com**20060620035727]
[slave: refactor Command startup/completion a bit
warner at lothar.com**20060620035556]
[add test and docs for the (not-yet implemented) watch-multiple-logfiles feature
warner at lothar.com**20060616195742]
[tests: some rmtree refactoring, and create SlaveCommandTestBase
warner at lothar.com**20060616195352]
[test_run.py: factor out rmtree
warner at lothar.com**20060616171011]
[more SignalMixin refactoring
warner at lothar.com**20060616170855]
[move some test utilities like SignalMixin and FakeSlaveBuilder to a common file
warner at lothar.com**20060616170356]
[test_vc.P4: rename testBranch to testCheckoutBranch to match others
warner at lothar.com**20060616054020]
[rearrange BuildStatus.addStepWithName a bit
warner at lothar.com**20060616051059]
[new LogObserver test, new setupBuildStepStatus utility method
warner at lothar.com**20060616010650]
[LogObserver: add outReceived and errReceived base methods
warner at lothar.com**20060616010620]
[improve BuildStepStatus creation and setting
warner at lothar.com**20060616010140]
[add user's manual sections on LogObservers, writing status plugins
warner at lothar.com**20060615013052]
[implement TrialTestCaseCounter, a LogObserver that counts test cases run
warner at lothar.com**20060615012902]
[update step_twisted to new logs['stdio'] scheme
warner at lothar.com**20060615012611]
[prepare for multiple LogFiles, add LogObservers
warner at lothar.com**20060615012323]
[add ILogFile/ILogObserver
warner at lothar.com**20060615011055]
[move STDOUT/STDERR channel constants to buildbot.interfaces
warner at lothar.com**20060615010518]
[test_p4poller: fix python2.2 compatibility
warner at lothar.com**20060614064751]
[test_vc (P4): skip test properly if p4 is not installed
warner at lothar.com**20060612083413]
[ChangeLog: add entry for Perforce patch
warner at lothar.com**20060612082822]
[test_vc.py (P4): print something useful when we can't start the p4d server
warner at lothar.com**20060612081839]
[test_vc.py (P4): avoid use of 'sh -c' by passing '-d' to p4 so it won't use PWD
warner at lothar.com**20060612081817]
[test_vc.py: conditionalize some debug prints
warner at lothar.com**20060612081700]
[test_vc (P4): make it work
warner at lothar.com**20060612075018]
[applied patch SF#1473939, initial Perforce support
warner at lothar.com**20060612070100]
[setup.py: add Trove classifiers for PyPI
warner at lothar.com**20060612071801]
[fix an oversight in remote_getCurrentBuilds
warner at lothar.com**20060608213947]
[add a test for the WithProperties/ComparableMixin fix
warner at lothar.com**20060607165017]
[make WithProperties inherit from ComparableMixin, to avoid spurious config changes
warner at lothar.com**20060606185846]
[add py2exe support for windows, SF#1401121
warner at lothar.com**20060603201842]
[MailNotifier: don't double-escape the build URL, fixes SF#1452801
warner at lothar.com**20060603182034]
[add bug number to the svn-property-change fix
warner at lothar.com**20060603172839]
[contrib/svn_buildbot.py: handle property changes correctly
warner at lothar.com**20060602155304]
[fix test_web.py to match the title= change
warner at lothar.com**20060602062538]
[add a 'reason' tooltip to the yellow start-of-build box
warner at lothar.com**20060602051445]
[statusgui improvements
warner at lothar.com**20060602032854]
[set ShellCommand.flunkOnFailure=True by default
warner at lothar.com**20060602032323]
[gtkPanes.py: update, show steps and ETAs
warner at lothar.com**20060530070602]
[step_twisted.Trial: set the step name to 'trial', so it shows up properly in status displays
warner at lothar.com**20060530070343]
[improve test_properties, mitigate the occasional lockup against Twisted-1.3.0
warner at lothar.com**20060529000627]
[update default trialMode to match current Twisted options
warner at lothar.com**20060528220923]
[make the sample Manhole config use a localhost-only port
warner at lothar.com**20060528215911]
[buildbot.texinfo: mention darcs_buildbot.py
warner at lothar.com**20060528181049]
[fix a silly typo
Brian Warner <warner at lothar.com>**20060528145904]
[add a .boringfile
warner at lothar.com**20060528075720]
[stop claiming compatibility with Twisted-1.3.0
warner at lothar.com**20060528075528]
[add a .boringfile
warner at lothar.com**20060528075508]
[add a darcs commit-hook change sender
warner at lothar.com**20060528072700]
[bump versions to 0.7.3+ while between releases
warner at lothar.com**20060528015621]
[TAG buildbot-0.7.3
warner-buildbot at lothar.com**20060523171236]
Patch bundle hash:
3eeb141ab771545ec6a337d70fa884956cc92064
More information about the devel
mailing list