Skip to content

Commit

Permalink
Merge pull request #468 from majuscule/dlloyd/remove-duplicate-indexes
Browse files Browse the repository at this point in the history
remove duplicate index urls
  • Loading branch information
davidovich authored Mar 24, 2017
2 parents a4ab7ce + df10e6a commit f323b92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions piptools/scripts/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import sys
import tempfile
from collections import OrderedDict

import pip
from pip.req import InstallRequirement, parse_requirements
Expand Down Expand Up @@ -143,6 +144,8 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url, extra_index_url,
repository = LocalRequirementsRepository(existing_pins, repository)

log.debug('Using indexes:')
# remove duplicate index urls before processing
repository.finder.index_urls = list(OrderedDict.fromkeys(repository.finder.index_urls))
for index_url in repository.finder.index_urls:
log.debug(' {}'.format(index_url))

Expand Down

0 comments on commit f323b92

Please sign in to comment.