mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Sort all imports
This commit is contained in:
parent
c4cc0de249
commit
1832569530
97 changed files with 362 additions and 396 deletions
|
@ -3,29 +3,29 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
|
import optparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import optparse
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from pip import cmdoptions
|
from pip import cmdoptions
|
||||||
|
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
||||||
|
from pip.download import PipSession
|
||||||
|
from pip.exceptions import (
|
||||||
|
BadCommand, CommandError, InstallationError, PreviousBuildDirError,
|
||||||
|
UninstallationError
|
||||||
|
)
|
||||||
from pip.index import PackageFinder
|
from pip.index import PackageFinder
|
||||||
from pip.locations import running_under_virtualenv
|
from pip.locations import running_under_virtualenv
|
||||||
from pip.download import PipSession
|
|
||||||
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
|
|
||||||
CommandError, PreviousBuildDirError)
|
|
||||||
|
|
||||||
from pip.baseparser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
|
||||||
from pip.req import InstallRequirement, parse_requirements
|
from pip.req import InstallRequirement, parse_requirements
|
||||||
from pip.status_codes import (
|
from pip.status_codes import (
|
||||||
SUCCESS, ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND,
|
ERROR, PREVIOUS_BUILD_DIR_ERROR, SUCCESS, UNKNOWN_ERROR,
|
||||||
PREVIOUS_BUILD_DIR_ERROR,
|
VIRTUALENV_NOT_FOUND
|
||||||
)
|
)
|
||||||
from pip.utils import deprecation, get_prog, normalize_path
|
from pip.utils import deprecation, get_prog, normalize_path
|
||||||
from pip.utils.logging import IndentingFormatter
|
from pip.utils.logging import IndentingFormatter
|
||||||
from pip.utils.outdated import pip_version_check
|
from pip.utils.outdated import pip_version_check
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['Command']
|
__all__ = ['Command']
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
"""Base option parser setup"""
|
"""Base option parser setup"""
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import sys
|
|
||||||
import optparse
|
import optparse
|
||||||
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
from distutils.util import strtobool
|
from distutils.util import strtobool
|
||||||
|
|
||||||
from pip._vendor.six import string_types
|
from pip._vendor.six import string_types
|
||||||
|
|
||||||
from pip.configuration import Configuration
|
from pip.configuration import Configuration
|
||||||
from pip.utils import get_terminal_size
|
from pip.utils import get_terminal_size
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@ pass on state. To be consistent, all options will follow this design.
|
||||||
"""
|
"""
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from functools import partial
|
|
||||||
from optparse import OptionGroup, SUPPRESS_HELP, Option
|
|
||||||
import warnings
|
import warnings
|
||||||
|
from functools import partial
|
||||||
|
from optparse import SUPPRESS_HELP, Option, OptionGroup
|
||||||
|
|
||||||
from pip.index import (
|
from pip.index import (
|
||||||
FormatControl, fmt_ctl_handle_mutual_exclude, fmt_ctl_no_binary,
|
FormatControl, fmt_ctl_handle_mutual_exclude, fmt_ctl_no_binary
|
||||||
)
|
)
|
||||||
from pip.models import PyPI
|
|
||||||
from pip.locations import USER_CACHE_DIR, src_prefix
|
from pip.locations import USER_CACHE_DIR, src_prefix
|
||||||
|
from pip.models import PyPI
|
||||||
from pip.utils.hashes import STRONG_HASHES
|
from pip.utils.hashes import STRONG_HASHES
|
||||||
from pip.utils.ui import BAR_TYPES
|
from pip.utils.ui import BAR_TYPES
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ from pip.basecommand import Command
|
||||||
from pip.operations.check import check_requirements
|
from pip.operations.check import check_requirements
|
||||||
from pip.utils import get_installed_distributions
|
from pip.utils import get_installed_distributions
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pip.basecommand import Command
|
from pip.basecommand import Command
|
||||||
|
|
||||||
BASE_COMPLETION = """
|
BASE_COMPLETION = """
|
||||||
|
|
|
@ -3,16 +3,15 @@ from __future__ import absolute_import
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from pip import cmdoptions
|
||||||
|
from pip.basecommand import RequirementCommand
|
||||||
from pip.exceptions import CommandError
|
from pip.exceptions import CommandError
|
||||||
from pip.index import FormatControl
|
from pip.index import FormatControl
|
||||||
from pip.req import RequirementSet
|
from pip.req import RequirementSet
|
||||||
from pip.basecommand import RequirementCommand
|
|
||||||
from pip import cmdoptions
|
|
||||||
from pip.utils import ensure_dir, normalize_path
|
from pip.utils import ensure_dir, normalize_path
|
||||||
from pip.utils.build import BuildDirectory
|
from pip.utils.build import BuildDirectory
|
||||||
from pip.utils.filesystem import check_path_owner
|
from pip.utils.filesystem import check_path_owner
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,11 @@ from __future__ import absolute_import
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
from pip.compat import stdlib_pkgs
|
|
||||||
from pip.basecommand import Command
|
from pip.basecommand import Command
|
||||||
|
from pip.compat import stdlib_pkgs
|
||||||
from pip.operations.freeze import freeze
|
from pip.operations.freeze import freeze
|
||||||
from pip.wheel import WheelCache
|
from pip.wheel import WheelCache
|
||||||
|
|
||||||
|
|
||||||
DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel'}
|
DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel'}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ from pip.status_codes import ERROR
|
||||||
from pip.utils import read_chunks
|
from pip.utils import read_chunks
|
||||||
from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES
|
from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from pip.basecommand import Command, SUCCESS
|
from pip.basecommand import SUCCESS, Command
|
||||||
from pip.exceptions import CommandError
|
from pip.exceptions import CommandError
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,25 +3,26 @@ from __future__ import absolute_import
|
||||||
import logging
|
import logging
|
||||||
import operator
|
import operator
|
||||||
import os
|
import os
|
||||||
import tempfile
|
|
||||||
import shutil
|
import shutil
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
from pip import cmdoptions
|
||||||
|
from pip.basecommand import RequirementCommand
|
||||||
|
from pip.exceptions import (
|
||||||
|
CommandError, InstallationError, PreviousBuildDirError
|
||||||
|
)
|
||||||
|
from pip.locations import distutils_scheme, virtualenv_no_global
|
||||||
|
from pip.req import RequirementSet
|
||||||
|
from pip.utils import ensure_dir, get_installed_version
|
||||||
|
from pip.utils.build import BuildDirectory
|
||||||
|
from pip.utils.filesystem import check_path_owner
|
||||||
|
from pip.wheel import WheelBuilder, WheelCache
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import wheel
|
import wheel
|
||||||
except ImportError:
|
except ImportError:
|
||||||
wheel = None
|
wheel = None
|
||||||
|
|
||||||
from pip.req import RequirementSet
|
|
||||||
from pip.basecommand import RequirementCommand
|
|
||||||
from pip.locations import virtualenv_no_global, distutils_scheme
|
|
||||||
from pip.exceptions import (
|
|
||||||
InstallationError, CommandError, PreviousBuildDirError,
|
|
||||||
)
|
|
||||||
from pip import cmdoptions
|
|
||||||
from pip.utils import ensure_dir, get_installed_version
|
|
||||||
from pip.utils.build import BuildDirectory
|
|
||||||
from pip.utils.filesystem import check_path_owner
|
|
||||||
from pip.wheel import WheelCache, WheelBuilder
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -3,21 +3,22 @@ from __future__ import absolute_import
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
from pip._vendor import six
|
||||||
|
|
||||||
|
from pip.basecommand import Command
|
||||||
|
from pip.cmdoptions import index_group, make_option_group
|
||||||
|
from pip.exceptions import CommandError
|
||||||
|
from pip.index import PackageFinder
|
||||||
|
from pip.utils import dist_is_editable, get_installed_distributions
|
||||||
|
from pip.utils.deprecation import RemovedInPip11Warning
|
||||||
|
from pip.utils.packaging import get_installer
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from itertools import zip_longest
|
from itertools import zip_longest
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from itertools import izip_longest as zip_longest
|
from itertools import izip_longest as zip_longest
|
||||||
|
|
||||||
from pip._vendor import six
|
|
||||||
|
|
||||||
from pip.basecommand import Command
|
|
||||||
from pip.exceptions import CommandError
|
|
||||||
from pip.index import PackageFinder
|
|
||||||
from pip.utils import (
|
|
||||||
get_installed_distributions, dist_is_editable)
|
|
||||||
from pip.utils.deprecation import RemovedInPip11Warning
|
|
||||||
from pip.utils.packaging import get_installer
|
|
||||||
from pip.cmdoptions import make_option_group, index_group
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -3,20 +3,19 @@ from __future__ import absolute_import
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from pip.basecommand import Command, SUCCESS
|
|
||||||
from pip.download import PipXmlrpcTransport
|
|
||||||
from pip.models import PyPI
|
|
||||||
from pip.utils import get_terminal_size
|
|
||||||
from pip.utils.logging import indent_log
|
|
||||||
from pip.exceptions import CommandError
|
|
||||||
from pip.status_codes import NO_MATCHES_FOUND
|
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
from pip._vendor.six.moves import xmlrpc_client
|
from pip._vendor.six.moves import xmlrpc_client
|
||||||
|
|
||||||
|
from pip.basecommand import SUCCESS, Command
|
||||||
|
from pip.download import PipXmlrpcTransport
|
||||||
|
from pip.exceptions import CommandError
|
||||||
|
from pip.models import PyPI
|
||||||
|
from pip.status_codes import NO_MATCHES_FOUND
|
||||||
|
from pip.utils import get_terminal_size
|
||||||
|
from pip.utils.logging import indent_log
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from email.parser import FeedParser
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from email.parser import FeedParser
|
||||||
|
|
||||||
from pip.basecommand import Command
|
|
||||||
from pip.status_codes import SUCCESS, ERROR
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
|
||||||
|
from pip.basecommand import Command
|
||||||
|
from pip.status_codes import ERROR, SUCCESS
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
|
||||||
from pip.req import InstallRequirement, parse_requirements
|
|
||||||
from pip.basecommand import Command
|
from pip.basecommand import Command
|
||||||
from pip.exceptions import InstallationError
|
from pip.exceptions import InstallationError
|
||||||
|
from pip.req import InstallRequirement, parse_requirements
|
||||||
|
|
||||||
|
|
||||||
class UninstallCommand(Command):
|
class UninstallCommand(Command):
|
||||||
|
|
|
@ -4,14 +4,13 @@ from __future__ import absolute_import
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from pip import cmdoptions
|
||||||
from pip.basecommand import RequirementCommand
|
from pip.basecommand import RequirementCommand
|
||||||
from pip.exceptions import CommandError, PreviousBuildDirError
|
from pip.exceptions import CommandError, PreviousBuildDirError
|
||||||
from pip.req import RequirementSet
|
from pip.req import RequirementSet
|
||||||
from pip.utils import import_or_raise
|
from pip.utils import import_or_raise
|
||||||
from pip.utils.build import BuildDirectory
|
from pip.utils.build import BuildDirectory
|
||||||
from pip.wheel import WheelCache, WheelBuilder
|
from pip.wheel import WheelBuilder, WheelCache
|
||||||
from pip import cmdoptions
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
"""Configuration management setup
|
"""Configuration management setup
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pip._vendor.six.moves import configparser
|
from pip._vendor.six.moves import configparser
|
||||||
|
|
||||||
from pip.locations import (
|
from pip.locations import (
|
||||||
legacy_config_file, config_basename, running_under_virtualenv,
|
config_basename, legacy_config_file, running_under_virtualenv,
|
||||||
site_config_files
|
site_config_files
|
||||||
)
|
)
|
||||||
from pip.utils import appdirs
|
from pip.utils import appdirs
|
||||||
|
|
||||||
|
|
||||||
_environ_prefix_re = re.compile(r"^PIP_", re.I)
|
_environ_prefix_re = re.compile(r"^PIP_", re.I)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,44 +13,43 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
try:
|
from pip._vendor import requests, six
|
||||||
import ssl # noqa
|
from pip._vendor.cachecontrol import CacheControlAdapter
|
||||||
HAS_TLS = True
|
from pip._vendor.cachecontrol.caches import FileCache
|
||||||
except ImportError:
|
from pip._vendor.lockfile import LockError
|
||||||
HAS_TLS = False
|
from pip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
|
||||||
|
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
|
||||||
|
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
|
||||||
|
from pip._vendor.requests.packages import urllib3
|
||||||
|
from pip._vendor.requests.structures import CaseInsensitiveDict
|
||||||
|
from pip._vendor.requests.utils import get_netrc_auth
|
||||||
|
from pip._vendor.six.moves import xmlrpc_client
|
||||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
|
from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
|
from pip.exceptions import HashMismatch, InstallationError
|
||||||
from pip.exceptions import InstallationError, HashMismatch
|
from pip.locations import write_delete_marker_file
|
||||||
from pip.models import PyPI
|
from pip.models import PyPI
|
||||||
from pip.utils import (splitext, rmtree, format_size, display_path,
|
from pip.utils import (
|
||||||
backup_dir, ask_path_exists, unpack_file,
|
ARCHIVE_EXTENSIONS, ask_path_exists, backup_dir, call_subprocess, consume,
|
||||||
ARCHIVE_EXTENSIONS, consume, call_subprocess,
|
display_path, format_size, get_installed_version, rmtree, splitext,
|
||||||
get_installed_version)
|
unpack_file
|
||||||
|
)
|
||||||
from pip.utils.encoding import auto_decode
|
from pip.utils.encoding import auto_decode
|
||||||
from pip.utils.filesystem import check_path_owner
|
from pip.utils.filesystem import check_path_owner
|
||||||
|
from pip.utils.glibc import libc_ver
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||||
from pip.utils.glibc import libc_ver
|
|
||||||
from pip.utils.ui import DownloadProgressProvider
|
from pip.utils.ui import DownloadProgressProvider
|
||||||
from pip.locations import write_delete_marker_file
|
|
||||||
from pip.vcs import vcs
|
from pip.vcs import vcs
|
||||||
from pip._vendor import requests, six
|
|
||||||
from pip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
|
|
||||||
from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth
|
|
||||||
from pip._vendor.requests.models import CONTENT_CHUNK_SIZE, Response
|
|
||||||
from pip._vendor.requests.utils import get_netrc_auth
|
|
||||||
from pip._vendor.requests.structures import CaseInsensitiveDict
|
|
||||||
from pip._vendor.requests.packages import urllib3
|
|
||||||
from pip._vendor.cachecontrol import CacheControlAdapter
|
|
||||||
from pip._vendor.cachecontrol.caches import FileCache
|
|
||||||
from pip._vendor.lockfile import LockError
|
|
||||||
from pip._vendor.six.moves import xmlrpc_client
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
import ssl # noqa
|
||||||
|
HAS_TLS = True
|
||||||
|
except ImportError:
|
||||||
|
HAS_TLS = False
|
||||||
|
|
||||||
__all__ = ['get_file_content',
|
__all__ = ['get_file_content',
|
||||||
'is_url', 'url_to_path', 'path_to_url',
|
'is_url', 'url_to_path', 'path_to_url',
|
||||||
|
|
39
pip/index.py
39
pip/index.py
|
@ -1,42 +1,41 @@
|
||||||
"""Routines related to PyPI, indexes"""
|
"""Routines related to PyPI, indexes"""
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import logging
|
|
||||||
import cgi
|
import cgi
|
||||||
from collections import namedtuple
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import logging
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import mimetypes
|
import mimetypes
|
||||||
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
|
from collections import namedtuple
|
||||||
|
|
||||||
|
from pip._vendor import html5lib, requests, six
|
||||||
|
from pip._vendor.distlib.compat import unescape
|
||||||
|
from pip._vendor.packaging import specifiers
|
||||||
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
from pip._vendor.requests.exceptions import SSLError
|
||||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
|
|
||||||
from pip.compat import ipaddress
|
from pip.compat import ipaddress
|
||||||
|
from pip.download import HAS_TLS, is_url, path_to_url, url_to_path
|
||||||
|
from pip.exceptions import (
|
||||||
|
BestVersionAlreadyInstalled, DistributionNotFound, InvalidWheelFilename,
|
||||||
|
UnsupportedWheel
|
||||||
|
)
|
||||||
|
from pip.pep425tags import get_supported
|
||||||
from pip.utils import (
|
from pip.utils import (
|
||||||
cached_property, splitext, normalize_path,
|
ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS, cached_property, normalize_path,
|
||||||
ARCHIVE_EXTENSIONS, SUPPORTED_EXTENSIONS,
|
splitext
|
||||||
)
|
)
|
||||||
from pip.utils.deprecation import RemovedInPip11Warning
|
from pip.utils.deprecation import RemovedInPip11Warning
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.utils.packaging import check_requires_python
|
from pip.utils.packaging import check_requires_python
|
||||||
from pip.exceptions import (
|
|
||||||
DistributionNotFound, BestVersionAlreadyInstalled, InvalidWheelFilename,
|
|
||||||
UnsupportedWheel,
|
|
||||||
)
|
|
||||||
from pip.download import HAS_TLS, is_url, path_to_url, url_to_path
|
|
||||||
from pip.wheel import Wheel, wheel_ext
|
from pip.wheel import Wheel, wheel_ext
|
||||||
from pip.pep425tags import get_supported
|
|
||||||
from pip._vendor import html5lib, requests, six
|
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
|
||||||
from pip._vendor.packaging import specifiers
|
|
||||||
from pip._vendor.requests.exceptions import SSLError
|
|
||||||
from pip._vendor.distlib.compat import unescape
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['FormatControl', 'fmt_ctl_handle_mutual_exclude', 'PackageFinder']
|
__all__ = ['FormatControl', 'fmt_ctl_handle_mutual_exclude', 'PackageFinder']
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,12 @@ import platform
|
||||||
import site
|
import site
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
|
|
||||||
from distutils import sysconfig as distutils_sysconfig
|
from distutils import sysconfig as distutils_sysconfig
|
||||||
from distutils.command.install import install, SCHEME_KEYS # noqa
|
from distutils.command.install import SCHEME_KEYS, install # noqa
|
||||||
|
|
||||||
from pip.compat import WINDOWS, expanduser
|
from pip.compat import WINDOWS, expanduser
|
||||||
from pip.utils import appdirs
|
from pip.utils import appdirs
|
||||||
|
|
||||||
|
|
||||||
# Application Directories
|
# Application Directories
|
||||||
USER_CACHE_DIR = appdirs.user_cache_dir("pip")
|
USER_CACHE_DIR = appdirs.user_cache_dir("pip")
|
||||||
|
|
||||||
|
|
|
@ -5,15 +5,15 @@ import os
|
||||||
import re
|
import re
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from pip.exceptions import InstallationError
|
|
||||||
from pip.req import InstallRequirement
|
|
||||||
from pip.req.req_file import COMMENT_RE
|
|
||||||
from pip.utils import get_installed_distributions, dist_is_editable
|
|
||||||
from pip.utils.deprecation import RemovedInPip11Warning
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.pkg_resources import RequirementParseError
|
from pip._vendor.pkg_resources import RequirementParseError
|
||||||
|
|
||||||
|
from pip.exceptions import InstallationError
|
||||||
|
from pip.req import InstallRequirement
|
||||||
|
from pip.req.req_file import COMMENT_RE
|
||||||
|
from pip.utils import dist_is_editable, get_installed_distributions
|
||||||
|
from pip.utils.deprecation import RemovedInPip11Warning
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,12 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import distutils.util
|
import distutils.util
|
||||||
|
import logging
|
||||||
|
import platform
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
import warnings
|
import warnings
|
||||||
import platform
|
|
||||||
import logging
|
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
import pip.utils.glibc
|
import pip.utils.glibc
|
||||||
|
|
|
@ -4,19 +4,19 @@ Requirements file parsing
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
import optparse
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shlex
|
import shlex
|
||||||
import sys
|
import sys
|
||||||
import optparse
|
|
||||||
|
|
||||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
|
||||||
from pip._vendor.six.moves import filterfalse
|
from pip._vendor.six.moves import filterfalse
|
||||||
|
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||||
|
|
||||||
from pip.download import get_file_content
|
|
||||||
from pip.req.req_install import InstallRequirement
|
|
||||||
from pip.exceptions import (RequirementsFileParseError)
|
|
||||||
from pip import cmdoptions
|
from pip import cmdoptions
|
||||||
|
from pip.download import get_file_content
|
||||||
|
from pip.exceptions import RequirementsFileParseError
|
||||||
|
from pip.req.req_install import InstallRequirement
|
||||||
|
|
||||||
__all__ = ['parse_requirements']
|
__all__ = ['parse_requirements']
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ import tempfile
|
||||||
import traceback
|
import traceback
|
||||||
import warnings
|
import warnings
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
from distutils.util import change_root
|
from distutils.util import change_root
|
||||||
from email.parser import FeedParser
|
from email.parser import FeedParser
|
||||||
|
|
||||||
|
@ -19,36 +18,28 @@ from pip._vendor.packaging import specifiers
|
||||||
from pip._vendor.packaging.markers import Marker
|
from pip._vendor.packaging.markers import Marker
|
||||||
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
from pip._vendor.packaging.requirements import InvalidRequirement, Requirement
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.packaging.version import Version, parse as parse_version
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
from pip._vendor.pkg_resources import parse_requirements, RequirementParseError
|
from pip._vendor.packaging.version import Version
|
||||||
|
from pip._vendor.pkg_resources import RequirementParseError, parse_requirements
|
||||||
|
|
||||||
import pip.wheel
|
import pip.wheel
|
||||||
|
|
||||||
from pip.compat import native_str
|
from pip.compat import native_str
|
||||||
from pip.download import is_url, url_to_path, path_to_url, is_archive_file
|
from pip.download import is_archive_file, is_url, path_to_url, url_to_path
|
||||||
from pip.exceptions import (
|
from pip.exceptions import InstallationError, UninstallationError
|
||||||
InstallationError, UninstallationError,
|
from pip.locations import PIP_DELETE_MARKER_FILENAME, running_under_virtualenv
|
||||||
)
|
from pip.req.req_uninstall import UninstallPathSet
|
||||||
from pip.locations import (
|
|
||||||
running_under_virtualenv, PIP_DELETE_MARKER_FILENAME,
|
|
||||||
)
|
|
||||||
from pip.utils import (
|
from pip.utils import (
|
||||||
display_path, rmtree, ask_path_exists, backup_dir, is_installable_dir,
|
_make_build_dir, ask_path_exists, backup_dir, call_subprocess,
|
||||||
dist_in_usersite, dist_in_site_packages,
|
display_path, dist_in_site_packages, dist_in_usersite, ensure_dir,
|
||||||
call_subprocess, read_text_file, _make_build_dir, ensure_dir,
|
get_installed_version, is_installable_dir, read_text_file, rmtree
|
||||||
get_installed_version,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from pip.utils.hashes import Hashes
|
|
||||||
from pip.utils.deprecation import RemovedInPip11Warning
|
from pip.utils.deprecation import RemovedInPip11Warning
|
||||||
|
from pip.utils.hashes import Hashes
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||||
from pip.utils.ui import open_spinner
|
from pip.utils.ui import open_spinner
|
||||||
from pip.req.req_uninstall import UninstallPathSet
|
|
||||||
from pip.vcs import vcs
|
from pip.vcs import vcs
|
||||||
from pip.wheel import move_wheel_files, Wheel
|
from pip.wheel import Wheel, move_wheel_files
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from collections import defaultdict
|
|
||||||
from itertools import chain
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
from collections import defaultdict
|
||||||
|
from itertools import chain
|
||||||
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources, requests
|
||||||
from pip._vendor import requests
|
|
||||||
|
|
||||||
from pip.compat import expanduser
|
from pip.compat import expanduser
|
||||||
from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path,
|
from pip.download import (
|
||||||
unpack_url)
|
is_dir_url, is_file_url, is_vcs_url, unpack_url, url_to_path
|
||||||
from pip.exceptions import (InstallationError, BestVersionAlreadyInstalled,
|
)
|
||||||
DistributionNotFound, PreviousBuildDirError,
|
from pip.exceptions import (
|
||||||
HashError, HashErrors, HashUnpinned,
|
BestVersionAlreadyInstalled, DirectoryUrlHashUnsupported,
|
||||||
DirectoryUrlHashUnsupported, VcsHashUnsupported,
|
DistributionNotFound, HashError, HashErrors, HashUnpinned,
|
||||||
UnsupportedPythonVersion)
|
InstallationError, PreviousBuildDirError, UnsupportedPythonVersion,
|
||||||
|
VcsHashUnsupported
|
||||||
|
)
|
||||||
from pip.req.req_install import InstallRequirement
|
from pip.req.req_install import InstallRequirement
|
||||||
from pip.utils import (
|
from pip.utils import (
|
||||||
display_path, dist_in_usersite, ensure_dir, normalize_path)
|
display_path, dist_in_usersite, ensure_dir, normalize_path
|
||||||
|
)
|
||||||
from pip.utils.hashes import MissingHashes
|
from pip.utils.hashes import MissingHashes
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.utils.packaging import check_dist_requires_python
|
from pip.utils.packaging import check_dist_requires_python
|
||||||
|
|
|
@ -10,19 +10,15 @@ import tempfile
|
||||||
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
|
|
||||||
from pip.compat import uses_pycache, WINDOWS, cache_from_source
|
from pip.compat import WINDOWS, cache_from_source, uses_pycache
|
||||||
from pip.exceptions import UninstallationError
|
from pip.exceptions import UninstallationError
|
||||||
from pip.locations import (
|
from pip.locations import bin_py, bin_user
|
||||||
bin_py, bin_user,
|
|
||||||
)
|
|
||||||
from pip.utils import (
|
from pip.utils import (
|
||||||
rmtree, ask, dist_in_usersite, is_local,
|
FakeFile, ask, dist_in_usersite, dist_is_local, egg_link_path, is_local,
|
||||||
egg_link_path, FakeFile,
|
normalize_path, renames, rmtree
|
||||||
renames, normalize_path, dist_is_local,
|
|
||||||
)
|
)
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,10 @@ from __future__ import absolute_import
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from pip.compat import WINDOWS, expanduser
|
|
||||||
from pip._vendor.six import PY2, text_type
|
from pip._vendor.six import PY2, text_type
|
||||||
|
|
||||||
|
from pip.compat import WINDOWS, expanduser
|
||||||
|
|
||||||
|
|
||||||
def user_cache_dir(appname):
|
def user_cache_dir(appname):
|
||||||
r"""
|
r"""
|
||||||
|
|
|
@ -2,7 +2,6 @@ import codecs
|
||||||
import locale
|
import locale
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
BOMS = [
|
BOMS = [
|
||||||
(codecs.BOM_UTF8, 'utf8'),
|
(codecs.BOM_UTF8, 'utf8'),
|
||||||
(codecs.BOM_UTF16, 'utf16'),
|
(codecs.BOM_UTF16, 'utf16'),
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import re
|
|
||||||
import ctypes
|
import ctypes
|
||||||
import platform
|
import platform
|
||||||
|
import re
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from pip.exceptions import HashMismatch, HashMissing, InstallationError
|
|
||||||
from pip.utils import read_chunks
|
|
||||||
from pip._vendor.six import iteritems, iterkeys, itervalues
|
from pip._vendor.six import iteritems, iterkeys, itervalues
|
||||||
|
|
||||||
|
from pip.exceptions import HashMismatch, HashMissing, InstallationError
|
||||||
|
from pip.utils import read_chunks
|
||||||
|
|
||||||
# The recommended hash algo of the moment. Change this whenever the state of
|
# The recommended hash algo of the moment. Change this whenever the state of
|
||||||
# the art changes; it won't hurt backward compatibility.
|
# the art changes; it won't hurt backward compatibility.
|
||||||
|
|
|
@ -5,13 +5,14 @@ import logging
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from pip.compat import WINDOWS
|
||||||
|
from pip.utils import ensure_dir
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import threading
|
import threading
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import dummy_threading as threading
|
import dummy_threading as threading
|
||||||
|
|
||||||
from pip.compat import WINDOWS
|
|
||||||
from pip.utils import ensure_dir
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pip._vendor import colorama
|
from pip._vendor import colorama
|
||||||
|
|
|
@ -15,7 +15,6 @@ from pip.locations import USER_CACHE_DIR, running_under_virtualenv
|
||||||
from pip.utils import ensure_dir, get_installed_version
|
from pip.utils import ensure_dir, get_installed_version
|
||||||
from pip.utils.filesystem import check_path_owner
|
from pip.utils.filesystem import check_path_owner
|
||||||
|
|
||||||
|
|
||||||
SELFCHECK_DATE_FMT = "%Y-%m-%dT%H:%M:%SZ"
|
SELFCHECK_DATE_FMT = "%Y-%m-%dT%H:%M:%SZ"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from email.parser import FeedParser
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
from email.parser import FeedParser
|
||||||
|
|
||||||
from pip._vendor.packaging import specifiers
|
|
||||||
from pip._vendor.packaging import version
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
|
from pip._vendor.packaging import specifiers, version
|
||||||
|
|
||||||
from pip import exceptions
|
from pip import exceptions
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import, division
|
||||||
from __future__ import division
|
|
||||||
|
|
||||||
import itertools
|
|
||||||
import sys
|
|
||||||
from signal import signal, SIGINT, default_int_handler
|
|
||||||
import time
|
|
||||||
import contextlib
|
import contextlib
|
||||||
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from signal import SIGINT, default_int_handler, signal
|
||||||
|
|
||||||
|
from pip._vendor import six
|
||||||
|
from pip._vendor.progress.bar import (
|
||||||
|
Bar, ChargingBar, FillingCirclesBar, FillingSquaresBar, IncrementalBar,
|
||||||
|
ShadyBar
|
||||||
|
)
|
||||||
|
from pip._vendor.progress.helpers import HIDE_CURSOR, SHOW_CURSOR, WritelnMixin
|
||||||
|
from pip._vendor.progress.spinner import Spinner
|
||||||
|
|
||||||
from pip.compat import WINDOWS
|
from pip.compat import WINDOWS
|
||||||
from pip.utils import format_size
|
from pip.utils import format_size
|
||||||
from pip.utils.logging import get_indentation
|
from pip.utils.logging import get_indentation
|
||||||
from pip._vendor import six
|
|
||||||
|
|
||||||
from pip._vendor.progress.bar import Bar, IncrementalBar
|
|
||||||
from pip._vendor.progress.bar import FillingCirclesBar, FillingSquaresBar
|
|
||||||
from pip._vendor.progress.bar import ChargingBar, ShadyBar
|
|
||||||
|
|
||||||
from pip._vendor.progress.helpers import (WritelnMixin,
|
|
||||||
HIDE_CURSOR, SHOW_CURSOR)
|
|
||||||
from pip._vendor.progress.spinner import Spinner
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pip._vendor import colorama
|
from pip._vendor import colorama
|
||||||
|
|
|
@ -4,16 +4,16 @@ import logging
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
from pip.download import path_to_url
|
||||||
|
from pip.utils import display_path, rmtree
|
||||||
|
from pip.vcs import VersionControl, vcs
|
||||||
|
|
||||||
# TODO: Get this into six.moves.urllib.parse
|
# TODO: Get this into six.moves.urllib.parse
|
||||||
try:
|
try:
|
||||||
from urllib import parse as urllib_parse
|
from urllib import parse as urllib_parse
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import urlparse as urllib_parse
|
import urlparse as urllib_parse
|
||||||
|
|
||||||
from pip.utils import rmtree, display_path
|
|
||||||
from pip.vcs import vcs, VersionControl
|
|
||||||
from pip.download import path_to_url
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import tempfile
|
|
||||||
import os.path
|
import os.path
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||||
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
|
|
||||||
from pip.compat import samefile
|
from pip.compat import samefile
|
||||||
from pip.exceptions import BadCommand
|
from pip.exceptions import BadCommand
|
||||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
|
||||||
|
|
||||||
from pip.utils import display_path, rmtree
|
from pip.utils import display_path, rmtree
|
||||||
from pip.vcs import vcs, VersionControl
|
from pip.vcs import VersionControl, vcs
|
||||||
|
|
||||||
|
|
||||||
urlsplit = urllib_parse.urlsplit
|
urlsplit = urllib_parse.urlsplit
|
||||||
urlunsplit = urllib_parse.urlunsplit
|
urlunsplit = urllib_parse.urlunsplit
|
||||||
|
|
|
@ -4,11 +4,11 @@ import logging
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from pip.utils import display_path, rmtree
|
|
||||||
from pip.vcs import vcs, VersionControl
|
|
||||||
from pip.download import path_to_url
|
|
||||||
from pip._vendor.six.moves import configparser
|
from pip._vendor.six.moves import configparser
|
||||||
|
|
||||||
|
from pip.download import path_to_url
|
||||||
|
from pip.utils import display_path, rmtree
|
||||||
|
from pip.vcs import VersionControl, vcs
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import re
|
||||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||||
|
|
||||||
from pip.index import Link
|
from pip.index import Link
|
||||||
from pip.utils import rmtree, display_path
|
from pip.utils import display_path, rmtree
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.vcs import vcs, VersionControl
|
from pip.vcs import VersionControl, vcs
|
||||||
|
|
||||||
_svn_xml_url_re = re.compile('url="([^"]+)"')
|
_svn_xml_url_re = re.compile('url="([^"]+)"')
|
||||||
_svn_rev_re = re.compile(r'committed-rev="(\d+)"')
|
_svn_rev_re = re.compile(r'committed-rev="(\d+)"')
|
||||||
|
|
21
pip/wheel.py
21
pip/wheel.py
|
@ -16,29 +16,28 @@ import stat
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from base64 import urlsafe_b64encode
|
from base64 import urlsafe_b64encode
|
||||||
from email.parser import Parser
|
from email.parser import Parser
|
||||||
|
|
||||||
|
from pip._vendor import pkg_resources
|
||||||
|
from pip._vendor.distlib.scripts import ScriptMaker
|
||||||
|
from pip._vendor.packaging.utils import canonicalize_name
|
||||||
from pip._vendor.six import StringIO
|
from pip._vendor.six import StringIO
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
|
from pip import pep425tags
|
||||||
from pip.compat import expanduser
|
from pip.compat import expanduser
|
||||||
from pip.download import path_to_url, unpack_url
|
from pip.download import path_to_url, unpack_url
|
||||||
from pip.exceptions import (
|
from pip.exceptions import (
|
||||||
InstallationError, InvalidWheelFilename, UnsupportedWheel)
|
InstallationError, InvalidWheelFilename, UnsupportedWheel
|
||||||
from pip.locations import distutils_scheme, PIP_DELETE_MARKER_FILENAME
|
)
|
||||||
from pip import pep425tags
|
from pip.locations import PIP_DELETE_MARKER_FILENAME, distutils_scheme
|
||||||
from pip.utils import (
|
from pip.utils import (
|
||||||
call_subprocess, ensure_dir, captured_stdout, rmtree, read_chunks,
|
call_subprocess, captured_stdout, ensure_dir, read_chunks, rmtree
|
||||||
)
|
)
|
||||||
from pip.utils.ui import open_spinner
|
|
||||||
from pip.utils.logging import indent_log
|
from pip.utils.logging import indent_log
|
||||||
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
from pip.utils.setuptools_build import SETUPTOOLS_SHIM
|
||||||
from pip._vendor.distlib.scripts import ScriptMaker
|
from pip.utils.ui import open_spinner
|
||||||
from pip._vendor import pkg_resources
|
|
||||||
from pip._vendor.packaging.utils import canonicalize_name
|
|
||||||
|
|
||||||
|
|
||||||
wheel_ext = '.whl'
|
wheel_ext = '.whl'
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,11 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
|
import pytest
|
||||||
from pip.utils import appdirs
|
from pip.utils import appdirs
|
||||||
|
|
||||||
from tests.lib import SRC_DIR, TestData
|
from tests.lib import SRC_DIR, TestData
|
||||||
from tests.lib.path import Path
|
from tests.lib.path import Path
|
||||||
from tests.lib.scripttest import PipTestEnvironment
|
from tests.lib.scripttest import PipTestEnvironment
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from distutils.core import setup
|
|
||||||
import sys
|
import sys
|
||||||
|
from distutils.core import setup
|
||||||
|
|
||||||
|
|
||||||
class FakeError(Exception):
|
class FakeError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
version = '0.1dev'
|
version = '0.1dev'
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command import egg_info as orig_egg_info
|
from setuptools.command import egg_info as orig_egg_info
|
||||||
|
|
||||||
|
|
||||||
class egg_info (orig_egg_info.egg_info):
|
class egg_info (orig_egg_info.egg_info):
|
||||||
def run(self):
|
def run(self):
|
||||||
orig_egg_info.egg_info.run(self)
|
orig_egg_info.egg_info.run(self)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
def path_to_url(path):
|
def path_to_url(path):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
def path_to_url(path):
|
def path_to_url(path):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
def path_to_url(path):
|
def path_to_url(path):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="requires_wheelbroken_upper",
|
name="requires_wheelbroken_upper",
|
||||||
version="0",
|
version="0",
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
# A chatty setup.py for testing pip subprocess output handling
|
# A chatty setup.py for testing pip subprocess output handling
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
print("HELLO FROM CHATTYMODULE %s" % (sys.argv[1],))
|
print("HELLO FROM CHATTYMODULE %s" % (sys.argv[1],))
|
||||||
print(os.environ)
|
print(os.environ)
|
||||||
print(sys.argv)
|
print(sys.argv)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(name='compilewheel',
|
setup(name='compilewheel',
|
||||||
version='1.0',
|
version='1.0',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(name='requires_simple',
|
setup(name='requires_simple',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
from setuptools import setup, find_packages
|
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
# Read the version number from a source file.
|
# Read the version number from a source file.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(name='simplewheel',
|
setup(name='simplewheel',
|
||||||
version='1.0',
|
version='1.0',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from setuptools import setup, find_packages
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(name='simplewheel',
|
setup(name='simplewheel',
|
||||||
version='2.0',
|
version='2.0',
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="singlemodule",
|
name="singlemodule",
|
||||||
version='0.0.1',
|
version='0.0.1',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
from pip.status_codes import ERROR
|
from pip.status_codes import ERROR
|
||||||
from tests.lib.path import Path
|
from tests.lib.path import Path
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from doctest import ELLIPSIS, OutputChecker
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from doctest import OutputChecker, ELLIPSIS
|
|
||||||
|
|
||||||
from tests.lib import _create_test_package, _create_test_package_with_srcdir
|
from tests.lib import _create_test_package, _create_test_package_with_srcdir
|
||||||
|
|
||||||
|
|
||||||
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
|
distribute_re = re.compile('^distribute==[0-9.]+\n', re.MULTILINE)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pip.exceptions import CommandError
|
|
||||||
from pip.basecommand import ERROR, SUCCESS
|
|
||||||
from pip.commands.help import HelpCommand
|
|
||||||
from pip.commands import commands_dict as commands
|
|
||||||
from mock import Mock
|
from mock import Mock
|
||||||
|
from pip.basecommand import ERROR, SUCCESS
|
||||||
|
from pip.commands import commands_dict as commands
|
||||||
|
from pip.commands.help import HelpCommand
|
||||||
|
from pip.exceptions import CommandError
|
||||||
|
|
||||||
|
|
||||||
def test_run_method_should_return_success_when_finds_command_name():
|
def test_run_method_should_return_success_when_finds_command_name():
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
|
import glob
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
import glob
|
from os.path import curdir, join, pardir
|
||||||
|
|
||||||
from os.path import join, curdir, pardir
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pip import pep425tags
|
from pip import pep425tags
|
||||||
from pip.utils import appdirs, rmtree
|
|
||||||
from pip.status_codes import ERROR
|
from pip.status_codes import ERROR
|
||||||
from tests.lib import (pyversion, pyversion_tuple,
|
from pip.utils import appdirs, rmtree
|
||||||
_create_test_package, _create_svn_repo, path_to_url,
|
from tests.lib import (
|
||||||
create_test_package_with_setup,
|
_create_svn_repo, _create_test_package, create_test_package_with_setup,
|
||||||
requirements_file)
|
path_to_url, pyversion, pyversion_tuple, requirements_file
|
||||||
|
)
|
||||||
from tests.lib.local_repos import local_checkout
|
from tests.lib.local_repos import local_checkout
|
||||||
from tests.lib.path import Path
|
from tests.lib.path import Path
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
|
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
|
|
||||||
from tests.lib.local_repos import local_checkout
|
import pytest
|
||||||
from pip.locations import write_delete_marker_file
|
from pip.locations import write_delete_marker_file
|
||||||
from pip.status_codes import PREVIOUS_BUILD_DIR_ERROR
|
from pip.status_codes import PREVIOUS_BUILD_DIR_ERROR
|
||||||
|
from tests.lib.local_repos import local_checkout
|
||||||
|
|
||||||
|
|
||||||
def test_cleanup_after_install(script, data):
|
def test_cleanup_after_install(script, data):
|
||||||
|
|
|
@ -3,8 +3,9 @@ Tests for compatibility workarounds.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.lib import pyversion, assert_all_changes
|
from tests.lib import assert_all_changes, pyversion
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.network
|
@pytest.mark.network
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import textwrap
|
import textwrap
|
||||||
import pytest
|
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.network
|
@pytest.mark.network
|
||||||
def test_simple_extras_install_from_pypi(script):
|
def test_simple_extras_install_from_pypi(script):
|
||||||
|
|
|
@ -2,9 +2,9 @@ import os.path
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from tests.lib import (
|
||||||
from tests.lib import (pyversion, requirements_file,
|
_create_test_package_with_subdirectory, pyversion, requirements_file
|
||||||
_create_test_package_with_subdirectory)
|
)
|
||||||
from tests.lib.local_repos import local_checkout
|
from tests.lib.local_repos import local_checkout
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tests.lib import assert_all_changes, pyversion
|
from tests.lib import assert_all_changes, pyversion
|
||||||
from tests.lib.local_repos import local_checkout
|
from tests.lib.local_repos import local_checkout
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,12 @@ tests specific to "pip install --user"
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
import pytest
|
|
||||||
|
|
||||||
from os.path import curdir, isdir, isfile
|
from os.path import curdir, isdir, isfile
|
||||||
|
|
||||||
from pip.compat import uses_pycache, cache_from_source
|
import pytest
|
||||||
|
from pip.compat import cache_from_source, uses_pycache
|
||||||
from tests.lib.local_repos import local_checkout
|
|
||||||
from tests.lib import pyversion
|
from tests.lib import pyversion
|
||||||
|
from tests.lib.local_repos import local_checkout
|
||||||
|
|
||||||
|
|
||||||
def _patch_dist_in_site_packages(script):
|
def _patch_dist_in_site_packages(script):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from tests.lib import (
|
||||||
from tests.lib import (_create_test_package, _change_test_package_version,
|
_change_test_package_version, _create_test_package, pyversion
|
||||||
pyversion)
|
)
|
||||||
from tests.lib.local_repos import local_checkout
|
from tests.lib.local_repos import local_checkout
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
|
||||||
from pip.vcs.git import Git
|
from pip.vcs.git import Git
|
||||||
from tests.lib import _create_test_package
|
from tests.lib import _create_test_package
|
||||||
from tests.lib.git_submodule_helpers import (
|
from tests.lib.git_submodule_helpers import (
|
||||||
_change_test_package_submodule,
|
_change_test_package_submodule, _create_test_package_with_submodule,
|
||||||
_pull_in_submodule_changes_to_module,
|
_pull_in_submodule_changes_to_module
|
||||||
_create_test_package_with_submodule,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
import glob
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import pytest
|
|
||||||
import glob
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
from tests.lib.path import Path
|
from tests.lib.path import Path
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
import pytest
|
import pytest
|
||||||
from pip.commands.search import (highest_version,
|
from pip.commands.search import (
|
||||||
print_results,
|
SearchCommand, highest_version, print_results, transform_hits
|
||||||
transform_hits,
|
)
|
||||||
SearchCommand)
|
|
||||||
from pip.status_codes import NO_MATCHES_FOUND, SUCCESS
|
from pip.status_codes import NO_MATCHES_FOUND, SUCCESS
|
||||||
from tests.lib import pyversion
|
from tests.lib import pyversion
|
||||||
|
|
||||||
|
|
||||||
if pyversion >= '3':
|
if pyversion >= '3':
|
||||||
VERBOSE_FALSE = False
|
VERBOSE_FALSE = False
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import textwrap
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import pytest
|
import textwrap
|
||||||
import pretend
|
|
||||||
|
|
||||||
from os.path import join, normpath
|
from os.path import join, normpath
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
from tests.lib import assert_all_changes
|
|
||||||
from tests.lib import create_test_package_with_setup
|
|
||||||
from tests.lib.local_repos import local_repo, local_checkout
|
|
||||||
|
|
||||||
|
import pretend
|
||||||
|
import pytest
|
||||||
from pip.req import InstallRequirement
|
from pip.req import InstallRequirement
|
||||||
from pip.utils import rmtree
|
from pip.utils import rmtree
|
||||||
|
from tests.lib import assert_all_changes, create_test_package_with_setup
|
||||||
|
from tests.lib.local_repos import local_checkout, local_repo
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.network
|
@pytest.mark.network
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""
|
"""
|
||||||
tests specific to uninstalling --user installs
|
tests specific to uninstalling --user installs
|
||||||
"""
|
"""
|
||||||
import pytest
|
|
||||||
from os.path import isdir, isfile
|
from os.path import isdir, isfile
|
||||||
|
|
||||||
from tests.lib import pyversion, assert_all_changes
|
import pytest
|
||||||
from tests.functional.test_install_user import _patch_dist_in_site_packages
|
from tests.functional.test_install_user import _patch_dist_in_site_packages
|
||||||
|
from tests.lib import assert_all_changes, pyversion
|
||||||
|
|
||||||
|
|
||||||
class Tests_UninstallUserSite:
|
class Tests_UninstallUserSite:
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
"""'pip wheel' tests"""
|
"""'pip wheel' tests"""
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
|
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
|
|
||||||
|
import pytest
|
||||||
from pip.locations import write_delete_marker_file
|
from pip.locations import write_delete_marker_file
|
||||||
from pip.status_codes import ERROR, PREVIOUS_BUILD_DIR_ERROR
|
from pip.status_codes import ERROR, PREVIOUS_BUILD_DIR_ERROR
|
||||||
from tests.lib import pyversion
|
from tests.lib import pyversion
|
||||||
|
|
|
@ -5,10 +5,9 @@ import subprocess
|
||||||
|
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
|
|
||||||
from pip.vcs import subversion, git, bazaar, mercurial
|
from pip.vcs import bazaar, git, mercurial, subversion
|
||||||
from tests.lib import path_to_url
|
from tests.lib import path_to_url
|
||||||
|
|
||||||
|
|
||||||
if hasattr(subprocess, "check_call"):
|
if hasattr(subprocess, "check_call"):
|
||||||
subprocess_call = subprocess.check_call
|
subprocess_call = subprocess.check_call
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -5,15 +5,16 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from pip._vendor import six
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from os import supports_fd
|
from os import supports_fd
|
||||||
except ImportError:
|
except ImportError:
|
||||||
supports_fd = set()
|
supports_fd = set()
|
||||||
|
|
||||||
from pip._vendor import six
|
|
||||||
|
|
||||||
|
|
||||||
_base = six.text_type if os.path.supports_unicode_filenames else str
|
_base = six.text_type if os.path.supports_unicode_filenames else str
|
||||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
import filecmp
|
import filecmp
|
||||||
import re
|
import re
|
||||||
from os.path import join, isdir
|
from os.path import isdir, join
|
||||||
|
|
||||||
from tests.lib import SRC_DIR
|
from tests.lib import SRC_DIR
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
import virtualenv as _virtualenv
|
import virtualenv as _virtualenv
|
||||||
|
|
||||||
from .path import Path
|
from .path import Path
|
||||||
|
|
||||||
|
|
||||||
# On Python < 3.3 we don't have subprocess.DEVNULL
|
# On Python < 3.3 we don't have subprocess.DEVNULL
|
||||||
try:
|
try:
|
||||||
DEVNULL = subprocess.DEVNULL
|
DEVNULL = subprocess.DEVNULL
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from os.path import dirname, abspath
|
import sys
|
||||||
|
from os.path import abspath, dirname
|
||||||
|
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
|
|
||||||
from pip.utils import rmtree
|
from pip.utils import rmtree
|
||||||
|
|
||||||
|
|
||||||
src_folder = dirname(dirname(abspath(__file__)))
|
src_folder = dirname(dirname(abspath(__file__)))
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
|
|
|
@ -4,7 +4,6 @@ import posixpath
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pretend
|
import pretend
|
||||||
|
|
||||||
from pip.utils import appdirs
|
from pip.utils import appdirs
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pip
|
import pip
|
||||||
from pip.basecommand import Command
|
|
||||||
from pip import cmdoptions
|
from pip import cmdoptions
|
||||||
|
from pip.basecommand import Command
|
||||||
|
|
||||||
|
|
||||||
class SimpleCommand(Command):
|
class SimpleCommand(Command):
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
from pip.compat import expanduser, get_path_uid, native_str
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from pip.compat import expanduser, get_path_uid, native_str
|
||||||
|
|
||||||
|
|
||||||
def test_get_path_uid():
|
def test_get_path_uid():
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from shutil import rmtree, copy
|
from shutil import copy, rmtree
|
||||||
from tempfile import mkdtemp
|
from tempfile import mkdtemp
|
||||||
|
|
||||||
from pip._vendor.six.moves.urllib import request as urllib_request
|
from pip._vendor.six.moves.urllib import request as urllib_request
|
||||||
|
|
||||||
from mock import Mock, patch
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
from pip.exceptions import HashMismatch
|
import pytest
|
||||||
|
from mock import Mock, patch
|
||||||
from pip.download import (
|
from pip.download import (
|
||||||
PipSession, SafeFileCache, path_to_url, unpack_http_url, url_to_path,
|
MultiDomainBasicAuth, PipSession, SafeFileCache, path_to_url,
|
||||||
unpack_file_url, MultiDomainBasicAuth
|
unpack_file_url, unpack_http_url, url_to_path
|
||||||
)
|
)
|
||||||
|
from pip.exceptions import HashMismatch
|
||||||
from pip.index import Link
|
from pip.index import Link
|
||||||
from pip.utils.hashes import Hashes
|
from pip.utils.hashes import Hashes
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
import pytest
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pip.wheel
|
from pkg_resources import Distribution, parse_version
|
||||||
|
|
||||||
import pip.pep425tags
|
import pip.pep425tags
|
||||||
|
import pip.wheel
|
||||||
from pkg_resources import parse_version, Distribution
|
import pytest
|
||||||
from pip.req import InstallRequirement
|
|
||||||
from pip.index import (
|
|
||||||
InstallationCandidate, PackageFinder, Link, FormatControl,
|
|
||||||
fmt_ctl_formats)
|
|
||||||
from pip.exceptions import BestVersionAlreadyInstalled, DistributionNotFound
|
|
||||||
from pip.download import PipSession
|
|
||||||
|
|
||||||
from mock import Mock, patch
|
from mock import Mock, patch
|
||||||
|
from pip.download import PipSession
|
||||||
|
from pip.exceptions import BestVersionAlreadyInstalled, DistributionNotFound
|
||||||
|
from pip.index import (
|
||||||
|
FormatControl, InstallationCandidate, Link, PackageFinder, fmt_ctl_formats
|
||||||
|
)
|
||||||
|
from pip.req import InstallRequirement
|
||||||
|
|
||||||
|
|
||||||
def test_no_mpkg(data):
|
def test_no_mpkg(data):
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import os.path
|
import os.path
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
from pip.download import PipSession
|
from pip.download import PipSession
|
||||||
from pip.index import HTMLPage
|
from pip.index import HTMLPage, Link, PackageFinder
|
||||||
from pip.index import PackageFinder, Link
|
|
||||||
|
|
||||||
|
|
||||||
def test_sort_locations_file_expand_dir(data):
|
def test_sort_locations_file_expand_dir(data):
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
locations.py tests
|
locations.py tests
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import shutil
|
|
||||||
import tempfile
|
|
||||||
import getpass
|
import getpass
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from mock import Mock
|
from mock import Mock
|
||||||
|
|
||||||
from pip.locations import distutils_scheme
|
from pip.locations import distutils_scheme
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import pip.configuration
|
import pip.configuration
|
||||||
from pip import main
|
import pytest
|
||||||
from pip import cmdoptions
|
from pip import cmdoptions, main
|
||||||
from pip.basecommand import Command
|
from pip.basecommand import Command
|
||||||
from pip.commands import commands_dict as commands
|
from pip.commands import commands_dict as commands
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from mock import patch
|
from mock import patch
|
||||||
from pip import pep425tags
|
from pip import pep425tags
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ Tests for the proxy support in pip.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
|
|
||||||
from tests.lib import SRC_DIR
|
from tests.lib import SRC_DIR
|
||||||
from tests.lib.path import Path
|
from tests.lib.path import Path
|
||||||
|
|
||||||
|
|
|
@ -3,21 +3,22 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from mock import Mock, patch, mock_open
|
|
||||||
from pip.commands.install import InstallCommand
|
|
||||||
from pip.exceptions import (PreviousBuildDirError, InvalidWheelFilename,
|
|
||||||
InstallationError, HashErrors)
|
|
||||||
from pip.download import path_to_url, PipSession
|
|
||||||
from pip.index import PackageFinder
|
|
||||||
from pip.req import (InstallRequirement, RequirementSet, Requirements)
|
|
||||||
from pip.req.req_file import process_line
|
|
||||||
from pip.req.req_install import parse_editable
|
|
||||||
from pip.utils import read_text_file
|
|
||||||
from pip._vendor import pkg_resources
|
from pip._vendor import pkg_resources
|
||||||
from pip._vendor.packaging.markers import Marker
|
from pip._vendor.packaging.markers import Marker
|
||||||
from pip._vendor.packaging.requirements import Requirement
|
from pip._vendor.packaging.requirements import Requirement
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from mock import Mock, mock_open, patch
|
||||||
|
from pip.commands.install import InstallCommand
|
||||||
|
from pip.download import PipSession, path_to_url
|
||||||
|
from pip.exceptions import (
|
||||||
|
HashErrors, InstallationError, InvalidWheelFilename, PreviousBuildDirError
|
||||||
|
)
|
||||||
|
from pip.index import PackageFinder
|
||||||
|
from pip.req import InstallRequirement, Requirements, RequirementSet
|
||||||
|
from pip.req.req_file import process_line
|
||||||
|
from pip.req.req_install import parse_editable
|
||||||
|
from pip.utils import read_text_file
|
||||||
from tests.lib import assert_raises_regexp, requirements_file
|
from tests.lib import assert_raises_regexp, requirements_file
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,18 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from mock import patch, Mock
|
|
||||||
import pytest
|
|
||||||
from pretend import stub
|
|
||||||
|
|
||||||
import pip
|
import pip
|
||||||
from pip.exceptions import (InstallationError, RequirementsFileParseError)
|
import pytest
|
||||||
|
from mock import Mock, patch
|
||||||
from pip.download import PipSession
|
from pip.download import PipSession
|
||||||
|
from pip.exceptions import InstallationError, RequirementsFileParseError
|
||||||
from pip.index import PackageFinder
|
from pip.index import PackageFinder
|
||||||
|
from pip.req.req_file import (
|
||||||
|
break_args_options, ignore_comments, join_lines, parse_requirements,
|
||||||
|
preprocess, process_line, skip_regex
|
||||||
|
)
|
||||||
from pip.req.req_install import InstallRequirement
|
from pip.req.req_install import InstallRequirement
|
||||||
from pip.req.req_file import (parse_requirements, process_line, join_lines,
|
from pretend import stub
|
||||||
ignore_comments, break_args_options, skip_regex,
|
|
||||||
preprocess)
|
|
||||||
from tests.lib import requirements_file
|
from tests.lib import requirements_file
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from pip.req.req_install import InstallRequirement
|
from pip.req.req_install import InstallRequirement
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import pip.req.req_uninstall
|
||||||
import pytest
|
import pytest
|
||||||
from mock import Mock
|
from mock import Mock
|
||||||
|
|
||||||
import pip.req.req_uninstall
|
|
||||||
from pip.req.req_uninstall import UninstallPathSet, uninstallation_paths
|
from pip.req.req_uninstall import UninstallPathSet, uninstallation_paths
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import sys
|
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
import freezegun
|
|
||||||
import pytest
|
|
||||||
import pretend
|
|
||||||
|
|
||||||
from pip._vendor import lockfile
|
from pip._vendor import lockfile
|
||||||
|
|
||||||
|
import freezegun
|
||||||
|
import pretend
|
||||||
|
import pytest
|
||||||
from pip.index import InstallationCandidate
|
from pip.index import InstallationCandidate
|
||||||
from pip.utils import outdated
|
from pip.utils import outdated
|
||||||
|
|
||||||
|
|
|
@ -5,26 +5,29 @@ util tests
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
import shutil
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import time
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import pytest
|
from pip._vendor.six import BytesIO
|
||||||
|
|
||||||
|
import pytest
|
||||||
from mock import Mock, patch
|
from mock import Mock, patch
|
||||||
from pip.exceptions import (HashMismatch, HashMissing, InstallationError,
|
from pip.exceptions import (
|
||||||
UnsupportedPythonVersion)
|
HashMismatch, HashMissing, InstallationError, UnsupportedPythonVersion
|
||||||
from pip.utils import (egg_link_path, get_installed_distributions,
|
)
|
||||||
untar_file, unzip_file, rmtree, normalize_path)
|
from pip.utils import (
|
||||||
|
egg_link_path, get_installed_distributions, normalize_path, rmtree,
|
||||||
|
untar_file, unzip_file
|
||||||
|
)
|
||||||
from pip.utils.build import BuildDirectory
|
from pip.utils.build import BuildDirectory
|
||||||
from pip.utils.encoding import auto_decode
|
from pip.utils.encoding import auto_decode
|
||||||
from pip.utils.hashes import Hashes, MissingHashes
|
|
||||||
from pip.utils.glibc import check_glibc_version
|
from pip.utils.glibc import check_glibc_version
|
||||||
|
from pip.utils.hashes import Hashes, MissingHashes
|
||||||
from pip.utils.packaging import check_dist_requires_python
|
from pip.utils.packaging import check_dist_requires_python
|
||||||
from pip._vendor.six import BytesIO
|
|
||||||
|
|
||||||
|
|
||||||
class Tests_EgglinkPath:
|
class Tests_EgglinkPath:
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
|
from pip._vendor.packaging.version import parse as parse_version
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.lib import pyversion
|
from mock import Mock
|
||||||
from pip.vcs import VersionControl
|
from pip.vcs import VersionControl
|
||||||
from pip.vcs.bazaar import Bazaar
|
from pip.vcs.bazaar import Bazaar
|
||||||
from pip.vcs.git import Git
|
from pip.vcs.git import Git
|
||||||
from pip.vcs.subversion import Subversion
|
from pip.vcs.subversion import Subversion
|
||||||
from mock import Mock
|
from tests.lib import pyversion
|
||||||
from pip._vendor.packaging.version import parse as parse_version
|
|
||||||
|
|
||||||
if pyversion >= '3':
|
if pyversion >= '3':
|
||||||
VERBOSE_FALSE = False
|
VERBOSE_FALSE = False
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""Tests for wheel binary packages and .dist-info."""
|
"""Tests for wheel binary packages and .dist-info."""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
|
||||||
from mock import patch, Mock
|
|
||||||
|
|
||||||
from pip._vendor.packaging.requirements import Requirement
|
from pip._vendor.packaging.requirements import Requirement
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from mock import Mock, patch
|
||||||
from pip import pep425tags, wheel
|
from pip import pep425tags, wheel
|
||||||
from pip.compat import expanduser, WINDOWS
|
from pip.compat import WINDOWS, expanduser
|
||||||
from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
|
from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
|
||||||
from pip.utils import unpack_file
|
from pip.utils import unpack_file
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue