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

Broken for latest node.js release 0.10.0 #28

Closed
bhang opened this issue Mar 11, 2013 · 0 comments · Fixed by #29
Closed

Broken for latest node.js release 0.10.0 #28

bhang opened this issue Mar 11, 2013 · 0 comments · Fixed by #29

Comments

@bhang
Copy link
Contributor

bhang commented Mar 11, 2013

The problem is this if block in get_node_src_url:

if version > "0.5.0":
    node_url = 'http://nodejs.org/dist/v%s/%s' % (version, tar_name)
else:
    node_url = 'http://nodejs.org/dist/%s' % (tar_name)

The above evaluates to False for 0.10.0. A better option might be to use parse_version from pkg_resources (distutils) and change this to

if parse_version(version) > parse_version("0.5.0"):
    node_url = 'http://nodejs.org/dist/v%s/%s' % (version, tar_name)
else:
    node_url = 'http://nodejs.org/dist/%s' % (tar_name)

as per this stackoverflow answer: http://stackoverflow.com/a/6972866

ekalinin added a commit that referenced this issue Mar 12, 2013
Fix for #28 - use pkg_resources.parse_version to compare versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants