logo       

Re: buildbot.tac error on win32: msg#00037

python.buildbot.devel

Subject: Re: buildbot.tac error on win32

Comments inline.

--- runner.py 10 May 2005 22:22:33 -0000 1.20
+++ runner.py 11 May 2005 03:17:45 -0000
@@ -104,13 +104,16 @@
f.close()

def makefile(self, source):
target = "Makefile"
- if os.path.exists(target):
- print "not touching existing Makefile"
- print "installing sample in Makefile.sample instead"
- target = "Makefile.sample"
- shutil.copy(source, target)
+ if os.path.exists(source):
+ if os.path.exists(target):
+ print "not touching existing Makefile"
+ print "installing sample in Makefile.sample instead"
+ target = "Makefile.sample"
+ shutil.copy(source, target)
+ else:
+ print "unable to create sample Makefile"

def sampleconfig(self, source):
target = "master.cfg"
if os.path.exists(target):

Ok (I agree that the process shouldn't fail just because the convenience
Makefile is missing, especially on windows where it's less likely to be
used), but let's also fix the root problem (which I think involves the
forward slashes in setup.py).

@@ -242,8 +245,14 @@
except:
print "unparseable master location '%s'" % master
print " expecting something more like localhost:8007"
raise
+
+ # escape the basedir config value so when the .tac file
+ # is processed later it will be a valid python string
+ if runtime.platformType == 'win32':
+ config['basedir'] = config['basedir'].replace("\\", "\\\\")
+

Is there a way we can do this with repr() that might be more portable? I'm ok
with this patch if it makes win32 work, but I'd prefer something a bit more
generic.

@@ -266,17 +275,16 @@
else:
# see if we can launch the application without actually having to
# spawn twistd, since spawning processes correctly is a real hassle
# on windows.
- from twisted.python.runtime import platformType
argv = ["twistd", "--no_save", "--python=buildbot.tac"]
- if platformType == "win32":
+ if runtime.platformType == 'win32':
argv.append("--reactor=win32")
sys.argv = argv

# this is copied from bin/twistd. twisted-1.3.0 uses twistw, while
# twisted-2.0.0 uses _twistw.
- if platformType == "win32":
+ if runtime.platformType == "win32":

Ok.


Go ahead and commit once you think the replace("\\") one is good enough.

thanks,
-Brian


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise