Page 1 of 1

Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 11:25 am
by zooounds
Am I missing something? I have followed the guide on this page but still gets these errors:

Code: Select all

$ python setup.py build
running bdist_egg
running egg_info
writing Blocklist.egg-info/PKG-INFO
writing top-level names to Blocklist.egg-info/top_level.txt
writing dependency_links to Blocklist.egg-info/dependency_links.txt
writing entry points to Blocklist.egg-info/entry_points.txt
Traceback (most recent call last):
  File "setup.py", line 55, in <module>
    """
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/bdist_egg.py", line 167, in run
    self.run_command("egg_info")
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 171, in run
    self.find_sources()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 252, in find_sources
    mm.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 306, in run
    self.add_defaults()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl
    for path in finder(dirname,path):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 98, in entries_finder
    log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined
running bdist_egg
running egg_info
writing Label.egg-info/PKG-INFO
writing top-level names to Label.egg-info/top_level.txt
writing dependency_links to Label.egg-info/dependency_links.txt
writing entry points to Label.egg-info/entry_points.txt
Traceback (most recent call last):
  File "setup.py", line 59, in <module>
    """
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/bdist_egg.py", line 167, in run
    self.run_command("egg_info")
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 171, in run
    self.find_sources()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 252, in find_sources
    mm.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 306, in run
    self.add_defaults()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl
    for path in finder(dirname,path):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 98, in entries_finder
    log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined
running build
running build_py
running egg_info
writing deluge.egg-info/PKG-INFO
writing top-level names to deluge.egg-info/top_level.txt
writing dependency_links to deluge.egg-info/dependency_links.txt
writing entry points to deluge.egg-info/entry_points.txt
Traceback (most recent call last):
  File "setup.py", line 332, in <module>
    version = "1.1.0_dev",
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "setup.py", line 236, in run
    _build.run(self)
  File "/usr/lib/python2.5/distutils/command/build.py", line 113, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/build_py.py", line 31, in run
    self.build_package_data()
  File "/usr/lib/python2.5/site-packages/setuptools/command/build_py.py", line 76, in build_package_data
    for package, src_dir, build_dir, filenames in self.data_files:
  File "/usr/lib/python2.5/site-packages/setuptools/command/build_py.py", line 39, in __getattr__
    self.data_files = files = self._get_data_files(); return files
  File "/usr/lib/python2.5/site-packages/setuptools/command/build_py.py", line 44, in _get_data_files
    self.analyze_manifest()
  File "/usr/lib/python2.5/site-packages/setuptools/command/build_py.py", line 92, in analyze_manifest
    self.run_command('egg_info')
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 171, in run
    self.find_sources()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 252, in find_sources
    mm.run()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 306, in run
    self.add_defaults()
  File "/usr/lib/python2.5/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl
    for path in finder(dirname,path):
  File "/usr/lib/python2.5/site-packages/setuptools/command/sdist.py", line 98, in entries_finder
    log.warn("unrecognized .svn/entries format in %s", dirname)
NameError: global name 'log' is not defined

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 12:57 pm
by Tjuh
I have the same problem on Arch, I cant build the svn version with the latest pkgbuild form AUR.

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 1:05 pm
by zooounds
Tjuh wrote:I have the same problem on Arch, I cant build the svn version with the latest pkgbuild form AUR.
How do I get this pkgbuild?

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 1:09 pm
by Tjuh

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 1:31 pm
by zooounds
To bad, that won't help me and my Ubuntu.

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 4:10 pm
by Tribaal
Same problem since a few days (I haven't updated in a while).

It seems related to setuptools - I tried using the version provided by ez_setup.py and the ubuntu-packaged version, and they both fail.

Edit:
Ah well it actually seems like svn screwed up instead of setuptools. I'll report back here when I find stuff.

Does anybody have an idea?

- Trib'

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 09, 2008 4:33 pm
by Tribaal
Alright, here is how you fix this on Hardy:

It's due to setuptools expecting SVN 1.4 format - and the default Hardy install has 1.5 installed.
There is a bug filled in setuptools, as well as a patch available, it will be fixed in next releases.

So here is how you do it:

Code: Select all

sudo aptitude remove python-setuptools # Make sure it's clean
#UNCOMMENT IF YOU UNDERSTAND WHAT THAT MEANS#sudo rm -rf /usr/lib/python2.5/site-packages/setuptools* # Make really sure it's clean.
sudo aptitude install python-pkg-resources # Required dependency.
cd /deluge/svn/root
nano ez_setup.py
In this file, replace

Code: Select all

DEFAULT_VERSION = "0.6c6" 
with

Code: Select all

DEFAULT_VERSION = "0.6c8"
Now run:

Code: Select all

sudo python ez_setup.py
This installs the "broken" setuptools afresh.

Now the fix (taken from here):

Code: Select all

sudo easy_install http://www.jaraco.com/ASP/eggs/setuptools-0.6c8_svn15fix.egg
Now you can, as usual, do a little "python setup.py build" and you should be all set!

Enjoy :)

- Trib'

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Sun Sep 14, 2008 8:01 am
by mojoxojom
thanks! that seems to have fixed it... (stares at cpu's dancing during the compile in the system monitor graph)

Re: Problem building from SVN on Ubuntu Hardy (NameError)

Posted: Tue Sep 16, 2008 2:01 am
by teloschistes
Thanks very much, Tribaal!