[Buildbot-devel] Looking for confirmation of problems with the buildbot-slave-0.8.2 setup.py script

Gareth Armstrong gareth.armstrong at hp.com
Tue Nov 9 11:17:02 UTC 2010


Hello Folks,

while trying to put together buildbot and buildbot-slave rpm pkgs from 
0.8.2, I came across the following glitch.  I would like to hear from 
some of the other folks if they can reproduce it.  I can reproduce this 
on Rhel5.5 i386 and Fedora 12 x86_64 platforms.

Dustin has already pushed b2db59faec8b429e9cdb2016992b10a504f2bc48 which 
fixes this but I would like input from others if possible just to 
confirm the bug.

Setuptools and Twisted are installed on both boxes.

On my F12 box,
$ rpm -q python-setuptools
python-setuptools-0.6c9-5.fc12.noarch

$ rpm -qa python-twisted*
python-twisted-core-10.0.0-1.oc.fc12.x86_64
python-twisted-words-10.0.0-1.oc.fc12.x86_64
python-twisted-names-10.0.0-1.oc.fc12.x86_64
python-twisted-mail-10.0.0-1.oc.fc12.x86_64
python-twisted-web-10.0.0-1.oc.fc12.x86_64

Note, this problem only occurs when setuptools/distribute is installed.

To reproduce:

[gareth at localhost] ~/WORK/BuildBot_deps
tar xvfz buildbot-slave-0.8.2.tar.gz && cd buildbot-slave-0.8.2

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ python setup.py install --root=toto

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ cat toto/usr/bin/buildslave
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 
'buildbot-slave==0.8.2','console_scripts','buildslave'
__requires__ = 'buildbot-slave==0.8.2'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
     sys.exit(
         load_entry_point('buildbot-slave==0.8.2', 'console_scripts', 
'buildslave')()
     )


However, I was expecting that the following be installed to toto/usr/bin

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ cat build/scripts-2.6/buildslave
*#!/usr/bin/python

from buildslave.scripts import runner
runner.run()*


The buildbot-0.8.2 tarball has a different variant of the setup.py 
script and deploys
[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-0.8.2
$ cat toto/usr/bin/buildbot
#!/usr/bin/python

from buildbot.scripts import runner
runner.run()

as expected.

Testing the installed toto/usr/bin/buildslave give the following sequences.

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
export 
PYTHONPATH=~/WORK/BuildBot_deps/buildbot-slave-0.8.2/toto/usr/lib/python2.6/site-packages:/usr/lib/python2.6/site-packages:/usr/lib64/python2.6/site-packages

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ ./toto/usr/bin/buildslave
Traceback (most recent call last):
   File "./toto/usr/bin/buildslave", line 5, in <module>
     from pkg_resources import load_entry_point
   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2671, 
in <module>
     working_set.require(__requires__)
   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 654, 
in require
     needed = self.resolve(parse_requirements(requirements))
   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 552, 
in resolve
     raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: twisted>=2.0.0

I know twisted is already present on my system and installed on my F12 
x86_64 system in /usr/lib64/python2.6/site-packages/twisted

Next, I repeat the above but install to the system wide site-packages
[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ rm -rf build toto

[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ sudo python setup.py install
.
.
creating dist
creating 'dist/buildbot_slave-0.8.2-py2.6.egg' and adding 
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing buildbot_slave-0.8.2-py2.6.egg
creating /usr/lib/python2.6/site-packages/buildbot_slave-0.8.2-py2.6.egg
Extracting buildbot_slave-0.8.2-py2.6.egg to 
/usr/lib/python2.6/site-packages
Adding buildbot-slave 0.8.2 to easy-install.pth file
Installing buildslave script to /usr/bin
Installing buildslave script to /usr/bin

Installed /usr/lib/python2.6/site-packages/buildbot_slave-0.8.2-py2.6.egg
Processing dependencies for buildbot-slave==0.8.2
Searching for twisted>=2.0.0
Reading http://pypi.python.org/simple/twisted/
Download error: [Errno 113] No route to host -- Some packages may not be 
found!
Reading http://pypi.python.org/simple/twisted/
Download error: [Errno 113] No route to host -- Some packages may not be 
found!
Couldn't find index page for 'twisted' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 113] No route to host -- Some packages may not be 
found!
No local packages or download links found for twisted>=2.0.0
error: Could not find suitable distribution for 
Requirement.parse('twisted>=2.0.0')

The above is bizarre given that I already twisted on my system.


However, still get the following variant of the buildslave script installed.


[gareth at localhost] ~/WORK/BuildBot_deps/buildbot-slave-0.8.2
$ cat /usr/bin/buildslave
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 
'buildbot-slave==0.8.2','console_scripts','buildslave'
__requires__ = 'buildbot-slave==0.8.2'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
     sys.exit(
         load_entry_point('buildbot-slave==0.8.2', 'console_scripts', 
'buildslave')()
     )


And the same error as above we I try to run /usr/bin/buildslave.

Many thanks for your time,

Gareth

-- 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101109/b0d159db/attachment.html>


More information about the devel mailing list