setuptools fails with a NameError when installing from an svn 1.5-version working copy

Bug #378096 reported by Jean-Paul Calderone
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-setuptools
Fix Released
Undecided
Unassigned
distribute (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Hardy by Scott Kitterman
python-setuptools (Ubuntu)
Confirmed
Undecided
Unassigned
Declined for Hardy by Scott Kitterman

Bug Description

Binary package hint: python-setuptools

When trying to use easy_install to install a Python package from an svn working copy, the following failure occurs:

Creating /var/lib/buildbot/twisted-trunk/linux32-py2.4-nevowinstall/build/installdir/lib/python2.4/site-packages/site.py
byte-compiling /var/lib/buildbot/twisted-trunk/linux32-py2.4-nevowinstall/build/installdir/lib/python2.4/site-packages/site.py to site.pyc
Processing Nevow
Running setup.py -vvv bdist_egg --dist-dir /var/lib/buildbot/twisted-trunk/linux32-py2.4-nevowinstall/build/Divmod/Nevow/egg-dist-tmp-VYKZmZ
running bdist_egg
running egg_info
creating Nevow.egg-info
writing Nevow.egg-info/PKG-INFO
writing top-level names to Nevow.egg-info/top_level.txt
writing dependency_links to Nevow.egg-info/dependency_links.txt
writing manifest file 'Nevow.egg-info/SOURCES.txt'
package init file 'twisted/plugins/__init__.py' not found (or not a regular file)
Traceback (most recent call last):
  File "/usr/bin/easy_install", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1671, in main
    with_ei_usage(lambda:
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1659, in with_ei_usage
    return f()
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1675, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 427, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 919, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26, in run_setup
    DirectorySandbox(setup_dir).run(
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 63, in run
    return func()
  File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 29, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 123, in ?
  File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", line 167, in run
    self.run_command("egg_info")
  File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 171, in run
    self.find_sources()
  File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 252, in find_sources
    mm.run()
  File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 306, in run
    self.add_defaults()
  File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 333, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 45, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/lib/python2.4/site-packages/setuptools/command/sdist.py", line 52, in _default_revctrl
    for path in finder(dirname,path):
  File "/usr/lib/python2.4/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
program finished with exit code 1

This seems to be a known upstream bug: http://bugs.python.org/setuptools/issue64

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 378096] [NEW] setuptools fails with a NameError when installing from an svn 1.5-version working copy

What Ubuntu release are you using?

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

Oops, sorry:

exarkun@ampere:~$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
exarkun@ampere:~$ apt-cache policy python-setuptools
python-setuptools:
  Installed: 0.6c8-0ubuntu2
  Candidate: 0.6c8-0ubuntu2
  Version table:
 *** 0.6c8-0ubuntu2 0
        500 ftp://mirror.hetzner.de hardy/main Packages
        500 http://de.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status
exarkun@ampere:~$

Revision history for this message
Sergey Belov (arikon) wrote :

I have the same problem on Ubuntu Hardy.

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

Seems I mis-linked to the upstream bug report in the ticket description. The actual report is <http://bugs.python.org/setuptools/issue4>. Near as I can tell, the upstream fix which was applied is <http://svn.python.org/view/sandbox/trunk/setuptools/setuptools/command/sdist.py?r1=52008&r2=60846>. It would seem to be very easy to apply this fix to the Ubuntu package as well.

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

I don't know how to generate a debdiff. Here's a regular diff against the python-setuptools source package, though, which applies the above linked change.

Changed in python-setuptools (Ubuntu):
status: New → Fix Committed
status: Fix Committed → New
Revision history for this message
Gediminas Paulauskas (menesis) wrote :

python-setuptools 0.6c9 as found in intrepid has this problem (name 'log' not defined) fixed. Would be good to upload it to hardy-updates.

However, this would only successfully print the warning "unrecognized .svn/entries format". To support subversion 1.5 working directories, setuptools 0.6c11 is needed.

Changed in python-setuptools (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Ubuntu is now using the distribute fork of setuptools. Is it affected by this?

Revision history for this message
Gediminas Paulauskas (menesis) wrote : Re: [Bug 378096] Re: setuptools fails with a NameError when installing from an svn 1.5-version working copy

2010/4/14 Scott Kitterman <email address hidden>:
> Ubuntu is now using the distribute fork of setuptools.  Is it affected
> by this?

No, this bug was fixed in setuptools 0.6c9, so concerns only hardy --
and the backport would still be very welcome.

Changed in distribute (Ubuntu):
status: New → Invalid
Changed in setuptools:
importance: Unknown → Undecided
status: Unknown → New
status: New → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Thanks. A complete backport would take a broad test effort. From the description, it seems this would be relatively simple to fix. If someone can provide a patch and how to verify the fix, I can try to get Hardy fixed.

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

The most suitable fix is the next upstream version that is in intrepid:

python-setuptools (0.6c9-0ubuntu1) intrepid

this only needs to be rebuilt for hardy-updates.

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

So this is actually a duplicate of Bug #262636 .

To properly support subversion 1.5, setuptools 0.6c11 is needed. That was never packaged for Lucid or unstable, because Debian switched to distribute, that had this fix earlier that setuptools. But I have this version packaged at https://edge.launchpad.net/~schooltool-owners/+archive/ppa/+packages?field.name_filter=setuptools

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.