Bug in setuptools/command/sdist.py: global name 'log' is not defined

When I use ``py setup.py develop``, I get this error: Traceback (most recent call last): File "setup.py", line 79, in ? entry_points = { 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-0.6c7-py2.4.egg/ setuptools/command/develop.py", line 27, in run self.install_for_development() File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/develop.py", line 85, in install_for_development 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-0.6c7-py2.4.egg/ setuptools/command/egg_info.py", line 171, in run self.find_sources() File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/egg_info.py", line 252, in find_sources mm.run() File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/egg_info.py", line 306, in run self.add_defaults() File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/egg_info.py", line 333, in add_defaults rcfiles = list(walk_revctrl()) File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/sdist.py", line 45, in walk_revctrl for item in ep.load()(dirname): File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ setuptools/command/sdist.py", line 52, in _default_revctrl for path in finder(dirname,path): File "/usr/lib/python2.4/site-packages/setuptools-0.6c7-py2.4.egg/ 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 It looks like the version of my .svn/entries file is newer (head - n1 .svn/entries: 9). I fixed this by adding "from distutils import log" at the stop of setuptools/command/sdist.py. The version, as suggested by the stack trace, is 0.6c7. David

On 15-Feb-08, at 3:47 PM, Phillip J. Eby wrote:
At 10:35 AM 2/13/2008 -0500, David Wolever wrote:
It looks like the version of my .svn/entries file is newer (head - n1 .svn/entries: 9). Hm. Does it detect the correct files, if you change the 'data.startswith("8")' to 'data.startswith("9")'? If I change the 9 to an 8 in trunk/.svn/entries, seems to get the revision number on the egg correct.

At 03:58 PM 2/15/2008 -0500, David Wolever wrote:
On 15-Feb-08, at 3:47 PM, Phillip J. Eby wrote:
At 10:35 AM 2/13/2008 -0500, David Wolever wrote:
It looks like the version of my .svn/entries file is newer (head - n1 .svn/entries: 9). Hm. Does it detect the correct files, if you change the 'data.startswith("8")' to 'data.startswith("9")'? If I change the 9 to an 8 in trunk/.svn/entries, seems to get the revision number on the egg correct.
I'm asking if changing the code in setuptools causes it to detect the correct files for inclusion in the .egg-info's SOURCES.txt. The revision number has nothing to do with the error you were getting, and is read using entirely different code. To be sure of getting the right info, delete the SOURCES.txt, then run "setup.py egg_info" and see if the regenerated SOURCES.txt lists all (and only) files that are under revision control in your project.

To be sure of getting the right info, delete the SOURCES.txt, then run "setup.py egg_info" and see if the regenerated SOURCES.txt lists all (and only) files that are under revision control in your project. Alright, I've changed sdist.py to: if data.startswith('8') or data.startswith('9'): # subversion 1.4 Deleted SOURCES.txt setup.py egg_info
On 15-Feb-08, at 5:20 PM, Phillip J. Eby wrote: then diffed SOURCES.txt with `svn list -R`, and they seem to be identical. FYI, I'm using svn 1.6.0 -- it's an SVN build which hasn't been released yet. David
participants (2)
-
David Wolever
-
Phillip J. Eby