install zeroconf
This commit is contained in:
parent
0b9788acc3
commit
9d2628be78
108 changed files with 8626 additions and 840 deletions
|
|
@ -4,29 +4,27 @@ import logging
|
|||
import re
|
||||
|
||||
import pip
|
||||
from pip.compat import stdlib_pkgs
|
||||
from pip.req import InstallRequirement
|
||||
from pip.utils import get_installed_distributions
|
||||
from pip._vendor import pkg_resources
|
||||
from pip._vendor.packaging.utils import canonicalize_name
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# packages to exclude from freeze output
|
||||
freeze_excludes = stdlib_pkgs + ['setuptools', 'pip', 'distribute']
|
||||
|
||||
|
||||
def freeze(
|
||||
requirement=None,
|
||||
find_links=None, local_only=None, user_only=None, skip_regex=None,
|
||||
default_vcs=None,
|
||||
isolated=False,
|
||||
wheel_cache=None):
|
||||
wheel_cache=None,
|
||||
skip=()):
|
||||
find_links = find_links or []
|
||||
skip_match = None
|
||||
|
||||
if skip_regex:
|
||||
skip_match = re.compile(skip_regex)
|
||||
skip_match = re.compile(skip_regex).search
|
||||
|
||||
dependency_links = []
|
||||
|
||||
|
|
@ -42,7 +40,7 @@ def freeze(
|
|||
yield '-f %s' % link
|
||||
installations = {}
|
||||
for dist in get_installed_distributions(local_only=local_only,
|
||||
skip=freeze_excludes,
|
||||
skip=(),
|
||||
user_only=user_only):
|
||||
req = pip.FrozenRequirement.from_dist(
|
||||
dist,
|
||||
|
|
@ -55,12 +53,15 @@ def freeze(
|
|||
for line in req_file:
|
||||
if (not line.strip() or
|
||||
line.strip().startswith('#') or
|
||||
(skip_match and skip_match.search(line)) or
|
||||
(skip_match and skip_match(line)) or
|
||||
line.startswith((
|
||||
'-r', '--requirement',
|
||||
'-Z', '--always-unzip',
|
||||
'-f', '--find-links',
|
||||
'-i', '--index-url',
|
||||
'--pre',
|
||||
'--trusted-host',
|
||||
'--process-dependency-links',
|
||||
'--extra-index-url'))):
|
||||
yield line.rstrip()
|
||||
continue
|
||||
|
|
@ -109,4 +110,5 @@ def freeze(
|
|||
)
|
||||
for installation in sorted(
|
||||
installations.values(), key=lambda x: x.name.lower()):
|
||||
yield str(installation).rstrip()
|
||||
if canonicalize_name(installation.name) not in skip:
|
||||
yield str(installation).rstrip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue