Exemple #1
0
 def build_dependency_graph(self, requirement_set):
     """Build dependency graph"""
     # Initialize pip's version control modules
     # This is necessary to ensure we can determine if a project
     # is editable or not
     pip.version_control()
     # Create a frozen requirement for each installed dist
     dep_graph = RequirementsDependencyGraph()
     retriever = DistributionRetriever()
     dists = retriever.get_distributions(requirement_set)
     for dist in dists:
         self._collect_dependencies(dist, dep_graph, retriever)
     return dep_graph
Exemple #2
0
 def build_dependency_graph(self, requirement_set):
     """Build dependency graph"""
     # Initialize pip's version control modules
     # This is necessary to ensure we can determine if a project
     # is editable or not
     pip.version_control()
     # Create a frozen requirement for each installed dist
     dep_graph = RequirementsDependencyGraph()
     retriever = DistributionRetriever()
     dists = retriever.get_distributions(requirement_set)
     for dist in dists:
         self._collect_dependencies(dist, dep_graph, retriever)
     return dep_graph
        finally:
            logger.indent -= 2


# ---

import optparse

from pip.index import PackageFinder
from pip.req import RequirementSet, parse_requirements
from pip.locations import build_prefix, src_prefix

try:
    # Set up the version control backends
    from pip import version_control
    version_control()
except:
    # Recent versions of pip don't need this
    pass

# Logging
parser = optparse.OptionParser(usage='%prog [--verbose] <requirements file>')
parser.add_option('-v', '--verbose', action='store_true', dest='verbose')
options, args = parser.parse_args()
level = 1 if options.verbose else 0
level = logger.level_for_integer(4 - level)
logger.consumers.extend([(level, sys.stdout)])

if not len(args):
    parser.print_help()
    sys.exit()
                    self.copy_to_build_dir(req_to_install)
        finally:
            logger.indent -= 2

# ---

import optparse

from pip.index import PackageFinder
from pip.req import RequirementSet, parse_requirements
from pip.locations import build_prefix, src_prefix

try:
    # Set up the version control backends
    from pip import version_control
    version_control()
except:
    # Recent versions of pip don't need this
    pass

# Logging
parser = optparse.OptionParser(usage='%prog [--verbose] <requirements file>')
parser.add_option('-v', '--verbose', action='store_true', dest='verbose')
options, args = parser.parse_args()
level = 1 if options.verbose else 0
level = logger.level_for_integer(4-level)
logger.consumers.extend([(level, sys.stdout)])

if not len(args):
    parser.print_help()
    sys.exit()