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

Can't be installed as a dependency on python 2.6 #91

Closed
Bernardo-MG opened this issue Apr 8, 2015 · 1 comment
Closed

Can't be installed as a dependency on python 2.6 #91

Bernardo-MG opened this issue Apr 8, 2015 · 1 comment
Assignees

Comments

@Bernardo-MG
Copy link
Collaborator

It seems to be a problem with the setuptools. Python 2.6 is unable to install it, ast gives an error.

Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-pvoocy/CWR-API/setup.py", line 29, in <module>
        f.read().decode('utf-8')).group(1)))
      File "/opt/python/2.6.9/lib/python2.6/ast.py", line 49, in literal_eval
        node_or_string = parse(node_or_string, mode='eval')
      File "/opt/python/2.6.9/lib/python2.6/ast.py", line 37, in parse
        return compile(expr, filename, mode, PyCF_ONLY_AST

Check rubik/radon#21

@Bernardo-MG
Copy link
Collaborator Author

Fixed by stripping the version number from non-characters.

with open('webapp/__init__.py', 'rb', encoding='utf-8') as f:
    version = f.read()
    version = _version_re.search(version).group(1)
    version = str(ast.literal_eval(version.rstrip()))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant