mjpieters/setuptools_subversion — pull request #2 by mauritsvanrees (2011-11-08 11:56:00+00:00)
Title: Fix python 2.4 compatibility again

Hi Martijn,

With setuptools_subversion 1.4 I get an error when doing 'python2.4 setup.py sdist'::

File "/Users/mauritsvanrees/src/git/setuptools_subversion/setuptools_subversion.py", line 39, in listfiles
return [f for f in files.splitlines() if not f.endswith(('/', os.sep))]
TypeError: expected a character buffer object

This is because string.endswith does not accept a tuple (like python 2.5+ does). A tuple actually seems unneeded here, as checking for endswith(os.sep) should be enough.

Keeping compatibility with python 2.4 seems an uphill battle for tools like this, though this change is easy enough. I know: it's about time I let python2.6 or 2.7 be my standard python. I actually came across this error when I was preparing exactly that move. :-)

Cheers,

Maurits