[Buildbot-devel] Confusion about WithProperties on Windows
Dustin J. Mitchell
dustin at v.igoro.us
Thu Jul 12 12:43:21 UTC 2012
On Wed, Jul 11, 2012 at 7:21 PM, Chris Ball <s0454615 at sms.ed.ac.uk> wrote:
> Hi,
>
> I have a buildslave running on Windows. As part of a ShellCommand,
> I include this:
> env={'PYTHONPATH':WithProperties("%(workdir)s\\X")})
>
> The path to my workdir is "C:\Users\username\npslavetest\Windows7_x64-mingw32".
> However, in the web status I see this:
> PYTHONPATH=C:\Users\username\npslavetest/Windows7_x64-mingw32\X;
>
> I wasn't expecting to see a forward slash in there. Have I misunderstood
> WithProperties? Does the forward slash not matter?
>
> (My command is failing; I think it's because of PYTHONPATH being wrong,
> but I'm not at all sure yet...).
Python does things I don't understand with paths on Windows, but they
usually turn out right.
72 def setBuilddir(self, builddir):
73 assert self.parent
74 self.builddir = builddir
75 self.basedir = os.path.join(self.bot.basedir, self.builddir)
76 if not os.path.isdir(self.basedir):
77 os.makedirs(self.basedir)
it's using os.path.join, which is the right way. I'm not sure why
Python chooses to use a / there instead of \.
Dustin
More information about the devel
mailing list