scripts/pythondistdeps: Only print rich dep list when required to.

This commit is contained in:
Gordon Messmer 2019-12-20 11:57:02 -08:00 committed by Igor Gnatenko
parent 4a71a3eccd
commit 3f58fc31f7
1 changed files with 4 additions and 1 deletions

View File

@ -269,7 +269,10 @@ for name in names:
spec_list.append('{n} >= {v} with {n} < {vnext}'.format(n=name, v=spec[1], vnext=next_ver))
else:
spec_list.append('{} {} {}'.format(name, spec[0], spec[1]))
print('(%s)' % ' with '.join(spec_list))
if len(spec_list) == 1:
print(spec_list[0])
else:
print('({})'.format(' with '.join(spec_list)))
else:
# Print out unversioned provides, requires, recommends, conflicts
print(name)