[Buildbot-devel] Escaping the slave virtualenv

Vasily vasslitvinov at pisem.net
Wed Oct 29 20:51:45 UTC 2014


Hi Kay,

Did you try explicitly setting PYTHONPATH to empty string via
env={'PYTHONPATH': ''} parameter for ShellCommand step?

Did you try manually reproducing what you're seeing (with all the
environment variables Buildbot so nicely dumps)?

What Buildbot version (master / slave) are you using?

Thanks,
Vasily
29 окт. 2014 г. 20:51 пользователь "Kay Hayen" <kay.hayen at gmail.com>
написал:

> Hello there,
>
> I am running Python tests which are supposed to run outside
> of the slave virtualenv. But I have reasons to believe that even
> if using /usr/bin/python, the PYTHONPATH is apparently still
> set, is it? I am not seeing it in the build log:
>
> /usr/bin/python tests/mercurial/run_all.py search
>  in dir /opt/buildbot/slave/mercurial-Py27/build (timeout 3600 secs)
>  watching logfiles {}
>  argv: ['/usr/bin/python', 'tests/mercurial/run_all.py', 'search']
>  environment:
>   COLUMNS=240
>   CONSOLE=/dev/console
>   HOME=/
>   INIT_VERSION=sysvinit-2.88
>   LINES=67
>   OLDPWD=/
>
> PATH=/opt/buildbot/sandbox/bin:/usr/lib/ccache:/sbin:/usr/sbin:/bin:/usr/bin
>   PREVLEVEL=N
>   PS1=(sandbox)#
>   PWD=/opt/buildbot/slave/mercurial-Py27/build
>   PYTHON=/usr/bin/python2.7
>   RUNLEVEL=2
>   SHELL=/bin/sh
>   TERM=linux
>   VIRTUAL_ENV=/opt/buildbot/sandbox
>   previous=N
>   runlevel=2
>
> The PYTHON variable is from my "env". The VIRTUAL_ENV is definitely the
> sandbox that runs Buildbot I am not seeing PYTHONPATH, I am not sure
> if VIRTUAL_ENV has an impact on it.
>
> As a matter of fact, the job has an issue there:
>
> Nuitka:WARNING:/usr/bin/hg:29: Cannot find 'mercurial' as relative or
> absolute import.
>
> which means "mercurial" is not in the PYTHONPATH. It is however, in the
> default
> system path of /usr/bin/python, and /usr/bin/hg finds it. Check this:
>
> Python 2.7.8 (default, Oct  7 2014, 22:02:06)
> [GCC 4.9.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import mercurial
> >>> mercurial.__path__
> ['/usr/lib/python2.7/dist-packages/mercurial']
>
> Any help is welcome here. What I really want is to have shell commands run
> that
> escape the virtualenv, without solving that in the commands. That is
> because I
> also run tests (or at least intend to) inside virtualenv, to test that is
> working fine
> with Nuitka.
>
> Yours,
> Kay
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20141029/0a4eb751/attachment.html>


More information about the devel mailing list