mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 06:46:15 +00:00
+4
-4
@@ -15,10 +15,10 @@ import click_completion
|
||||
import crayons
|
||||
import dotenv
|
||||
import delegator
|
||||
import pexpect
|
||||
from .vendor import pexpect
|
||||
import pipfile
|
||||
import pipdeptree
|
||||
from pipreqs import pipreqs
|
||||
from .vendor.pipreqs import pipreqs
|
||||
from blindspin import spinner
|
||||
|
||||
from requests.packages import urllib3
|
||||
@@ -183,7 +183,7 @@ def cleanup_virtualenv(bare=True):
|
||||
|
||||
def import_requirements(r=None, dev=False):
|
||||
import pip9
|
||||
from pip9.req.req_file import parse_requirements
|
||||
from .vendor.pip9.req.req_file import parse_requirements
|
||||
|
||||
# Parse requirements.txt file with Pip's parser.
|
||||
# Pip requires a `PipSession` which is a subclass of requests.Session.
|
||||
@@ -2079,7 +2079,7 @@ def do_uninstall(
|
||||
|
||||
|
||||
def do_shell(three=None, python=False, fancy=False, shell_args=None):
|
||||
from pipenv.patched.pew import pew
|
||||
from .patched.pew import pew
|
||||
|
||||
# Ensure that virtualenv is available.
|
||||
ensure_project(three=three, python=python, validate=False)
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ try:
|
||||
except ImportError:
|
||||
import pathlib2 as pathlib
|
||||
|
||||
from pip9 import ConfigOptionParser
|
||||
from .vendor.pip9 import ConfigOptionParser
|
||||
from .cmdparse import Script
|
||||
from .utils import (
|
||||
mkdir_p,
|
||||
@@ -218,7 +218,7 @@ class Project(object):
|
||||
|
||||
@classmethod
|
||||
def _get_virtualenv_location(cls, name):
|
||||
from pipenv.patched.pew.pew import get_workon_home
|
||||
from .patched.pew.pew import get_workon_home
|
||||
venv = get_workon_home() / name
|
||||
if not venv.exists():
|
||||
return ''
|
||||
@@ -262,7 +262,7 @@ class Project(object):
|
||||
return clean_name, encoded_hash
|
||||
|
||||
# Check for different capitalization of the same project.
|
||||
from pipenv.patched.pew.pew import lsenvs
|
||||
from .patched.pew.pew import lsenvs
|
||||
for env in lsenvs():
|
||||
try:
|
||||
env_name, hash_ = env.rsplit('-', 1)
|
||||
|
||||
+17
-17
@@ -20,7 +20,7 @@ try:
|
||||
from weakref import finalize
|
||||
except ImportError:
|
||||
try:
|
||||
from backports.weakref import finalize
|
||||
from .vendor.backports.weakref import finalize
|
||||
except ImportError:
|
||||
class finalize(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -40,20 +40,20 @@ try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
try:
|
||||
from pathlib2 import Path
|
||||
from .vendor.pathlib2 import Path
|
||||
except ImportError:
|
||||
pass
|
||||
from distutils.spawn import find_executable
|
||||
from contextlib import contextmanager
|
||||
from pipenv.patched.piptools.resolver import Resolver
|
||||
from pipenv.patched.piptools.repositories.pypi import PyPIRepository
|
||||
from pipenv.patched.piptools.scripts.compile import get_pip_command
|
||||
from pipenv.patched.piptools import logging as piptools_logging
|
||||
from pipenv.patched.piptools.exceptions import NoCandidateFound
|
||||
from pip9.download import is_archive_file
|
||||
from pip9.exceptions import DistributionNotFound
|
||||
from pip9.index import Link
|
||||
from pip9._vendor.requests.exceptions import HTTPError, ConnectionError
|
||||
from .patched.piptools.resolver import Resolver
|
||||
from .patched.piptools.repositories.pypi import PyPIRepository
|
||||
from .patched.piptools.scripts.compile import get_pip_command
|
||||
from .patched.piptools import logging as piptools_logging
|
||||
from .patched.piptools.exceptions import NoCandidateFound
|
||||
from .vendor.pip9.download import is_archive_file
|
||||
from .vendor.pip9.exceptions import DistributionNotFound
|
||||
from .vendor.pip9.index import Link
|
||||
from .vendor.pip9._vendor.requests.exceptions import HTTPError, ConnectionError
|
||||
|
||||
from .pep508checker import lookup
|
||||
from .environments import PIPENV_MAX_ROUNDS, PIPENV_CACHE_DIR
|
||||
@@ -72,8 +72,8 @@ requests = requests.Session()
|
||||
|
||||
|
||||
def get_requirement(dep):
|
||||
from pip9.req.req_install import _strip_extras, Wheel
|
||||
import requirements
|
||||
from .vendor.pip9.req.req_install import _strip_extras, Wheel
|
||||
from .vendor import requirements
|
||||
"""Pre-clean requirement strings passed to the requirements parser.
|
||||
|
||||
Ensures that we can accept both local and relative paths, file and VCS URIs,
|
||||
@@ -789,7 +789,7 @@ def is_editable(pipfile_entry):
|
||||
|
||||
|
||||
def is_vcs(pipfile_entry):
|
||||
from pipenv.vendor import requirements
|
||||
from .vendor import requirements
|
||||
|
||||
"""Determine if dictionary entry from Pipfile is for a vcs dependency."""
|
||||
if hasattr(pipfile_entry, 'keys'):
|
||||
@@ -807,8 +807,8 @@ def is_vcs(pipfile_entry):
|
||||
|
||||
def is_installable_file(path):
|
||||
"""Determine if a path can potentially be installed"""
|
||||
from pip9.utils import is_installable_dir
|
||||
from pip9.utils.packaging import specifiers
|
||||
from .vendor.pip9.utils import is_installable_dir
|
||||
from .vendor.pip9.utils.packaging import specifiers
|
||||
|
||||
if hasattr(path, 'keys') and any(
|
||||
key for key in path.keys() if key in ['file', 'path']
|
||||
@@ -859,7 +859,7 @@ def is_file(package):
|
||||
|
||||
def pep440_version(version):
|
||||
"""Normalize version to PEP 440 standards"""
|
||||
from pip9.index import parse_version
|
||||
from .vendor.pip9.index import parse_version
|
||||
|
||||
# Use pip built-in version parser.
|
||||
return str(parse_version(version))
|
||||
|
||||
@@ -7,6 +7,7 @@ set -eo pipefail
|
||||
# Set the PYPI vendor URL for pytest-pypi.
|
||||
PYPI_VENDOR_DIR="$(pwd)/tests/pypi/"
|
||||
export PYPI_VENDOR_DIR
|
||||
export PYTHONIOENCODING="utf-8"
|
||||
|
||||
prefix() {
|
||||
sed "s/^/ $1: /"
|
||||
|
||||
Reference in New Issue
Block a user