Skip to content

Commit

Permalink
Comment out potentially conflicting packages in results
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Apr 22, 2015
1 parent 891d8b6 commit 50f06cb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion piptools/scripts/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,20 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url,
# django==1.8 # via django-debug-toolbar
#
rev_deps = resolver.reverse_dependencies(results)

EXCLUDE_PACKAGES = {'setuptools', 'distribute', 'pip'}
for result in formatted_results:
annotation = None
if annotate:
annotation = ', '.join(sorted(rev_deps.get(result.name, [])))
if annotation:
annotation = 'via ' + annotation
log.info(format_requirement(result, annotation=annotation), fg=blue)
line = format_requirement(result, annotation=annotation)

if result.name in EXCLUDE_PACKAGES:
line = '# {}'.format(line)

log.info(line, fg=blue)

if dry_run:
log.warning('Dry-run, so nothing updated.')

0 comments on commit 50f06cb

Please sign in to comment.