[PEAK] bug in setuptools

Pavel Repin prepin+peak at gmail.com
Fri Jun 27 20:02:42 EDT 2008


When 'entries_finder' gets confused about the svn working copy .svn
entries, it tries to log an error by doing: log.warn(....). But
there's no 'log' object. See a simple hack that fixes it (below).

Does 'entries_finder' simply try to find objects that are under
version control minus the ones that have pending delete status? If so,
maybe invoking 'svn status' in a child process and parsing its output
would be more robust?

Bugfix:
--- sdist-orig.py	2008-06-25 15:41:39.724048000 -0700
+++ sdist.py	2008-06-25 15:41:18.249444800 -0700
@@ -95,7 +95,7 @@
         for match in entries_pattern.finditer(data):
             yield joinpath(dirname,unescape(match.group(1)))
     else:
-        log.warn("unrecognized .svn/entries format in %s", dirname)
+        print >> sys.stderr, "unrecognized .svn/entries format in
'%s'" % dirname


 finders = [

>
>
> setuptools\command\sdist.py", line98, in entries_finder
> NameError: global name 'log' is not defined
>
> Also, the execution started getting to that line after I upgraded
> subversion to 1.5.0, so adding support for that would be very welcome
> as well.
>
> Changing line 89 to:
>     if data[:1] in '89':    # subversion 1.4 or 1.5
> seems to work.
>
> A sample .svn/entries  file from a 1.5 working copy is attached, just in case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdist.py.diff
Type: application/octet-stream
Size: 416 bytes
Desc: not available
Url : http://www.eby-sarna.com/pipermail/peak/attachments/20080627/3c7b0364/sdist.py.obj


More information about the PEAK mailing list