Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sure if bug, but buildout fails to install a package with \r\n end of line characters. #130

benwah opened this issue Jul 2, 2013 · 3 comments · Fixed by #150


Copy link

commented Jul 2, 2013

Python version: 2.6.5

Develop: '[...]/downloads/sorl-thumbnail'
Traceback (most recent call last):
  File "/tmp/tmpD5YZcm", line 13, in <module>
    exec(compile(open('[...]/downloads/sorl-thumbnail/').read(), '[...]/downloads/sorl-thumbnail/', 'exec'))
  File "[...]/downloads/sorl-thumbnail/", line 2
    from setuptools import setup, find_packages
SyntaxError: invalid syntax

How I fixed it:

(In buildout 2.1.0), zc/buildout/, line 1251

exec(compile(open(%(setup)r).read(), %(setup)r, 'exec'))

Changed to:

exec(compile(open(%(setup)r).read().replace('\\r\\n', '\\n'), %(setup)r, 'exec'))

This comment has been minimized.

Copy link

commented Jul 2, 2013

Suggested alternative fix:

exec(compile(open(%(setup)r, 'U').read(), %(setup)r, 'exec'))

FWIW Python 2.7 doesn't complain about \r's in strings passed to compile(), so this only affects 2.6.


This comment has been minimized.

Copy link

commented Oct 21, 2013

Your fix works for me on Python 2.6.

tseaver added a commit that referenced this issue Oct 22, 2013
Fixes #130.

This comment has been minimized.

Copy link

commented Oct 25, 2013


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.