don't write pointless 'npm(foo) > 0' deps

This commit is contained in:
T.C. Hollingsworth 2013-01-09 18:44:46 -07:00
parent 5dd35b8cd5
commit 8792574c0a
2 changed files with 4 additions and 2 deletions

View File

@ -54,7 +54,7 @@ def main():
if 'engines' in metadata and 'node' in metadata['engines']:
deps += process_dep(req, metadata['engines']['node'])
else:
print req
deps += req
if 'dependencies' in metadata:
for name, version in metadata['dependencies'].iteritems():
@ -119,7 +119,8 @@ def convert_dep(req, operator, version):
# 1 or 1.x or 1.x.x or ~1
if len(parts) == 1 or parts[1] == 'x':
deps.append('{0} >= {1}'.format(req, parts[0]))
if parts[0] != 0:
deps.append('{0} >= {1}'.format(req, parts[0]))
deps.append('{0} < {1}'.format(req, parts[0]+1))
# 1.2.3 or 1.2.3-4 or 1.2.x or ~1.2.3 or 1.2

View File

@ -166,6 +166,7 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
- add defines to match libuv (#892601)
- make v8 dependency explicit (and thus more accurate)
- add -g to $C(XX)FLAGS instead of patching configure to add it
- don't write pointless 'npm(foo) > 0' deps
* Sat Jan 05 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-4
- install development headers