mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
lazy load utils pip too
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
+5
-1
@@ -9,7 +9,6 @@ import logging
|
||||
import click
|
||||
import crayons
|
||||
import delegator
|
||||
import pip
|
||||
import parse
|
||||
import requirements
|
||||
import fuzzywuzzy.process
|
||||
@@ -271,6 +270,7 @@ packages = [
|
||||
|
||||
|
||||
def get_requirement(dep):
|
||||
import pip
|
||||
"""Pre-clean requirement strings passed to the requirements parser.
|
||||
|
||||
Ensures that we can accept both local and relative paths, file and VCS URIs,
|
||||
@@ -454,6 +454,7 @@ def prepare_pip_source_args(sources, pip_args=None):
|
||||
|
||||
|
||||
def actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, verbose, clear, pre):
|
||||
import pip
|
||||
|
||||
class PipCommand(pip.basecommand.Command):
|
||||
"""Needed for pip-tools."""
|
||||
@@ -864,6 +865,8 @@ def is_vcs(pipfile_entry):
|
||||
|
||||
|
||||
def is_installable_file(path):
|
||||
import pip
|
||||
|
||||
"""Determine if a path can potentially be installed"""
|
||||
if hasattr(path, 'keys') and any(key for key in path.keys() if key in ['file', 'path']):
|
||||
path = urlparse(path['file']).path if 'file' in path else path['path']
|
||||
@@ -901,6 +904,7 @@ def is_file(package):
|
||||
|
||||
def pep440_version(version):
|
||||
"""Normalize version to PEP 440 standards"""
|
||||
import pip
|
||||
|
||||
# Use pip built-in version parser.
|
||||
return str(pip.index.parse_version(version))
|
||||
|
||||
Reference in New Issue
Block a user