|
5 | 5 | import os
|
6 | 6 | import re
|
7 | 7 |
|
8 |
| -from pip._vendor import pkg_resources, six |
| 8 | +from pip._vendor import six |
9 | 9 | from pip._vendor.packaging.utils import canonicalize_name
|
10 | 10 | from pip._vendor.pkg_resources import RequirementParseError
|
11 | 11 |
|
@@ -34,27 +34,14 @@ def freeze(
|
34 | 34 | if skip_regex:
|
35 | 35 | skip_match = re.compile(skip_regex).search
|
36 | 36 |
|
37 |
| - dependency_links = [] |
38 |
| - |
39 |
| - for dist in pkg_resources.working_set: |
40 |
| - if dist.has_metadata('dependency_links.txt'): |
41 |
| - dependency_links.extend( |
42 |
| - dist.get_metadata_lines('dependency_links.txt') |
43 |
| - ) |
44 |
| - for link in find_links: |
45 |
| - if '#egg=' in link: |
46 |
| - dependency_links.append(link) |
47 | 37 | for link in find_links:
|
48 | 38 | yield '-f %s' % link
|
49 | 39 | installations = {}
|
50 | 40 | for dist in get_installed_distributions(local_only=local_only,
|
51 | 41 | skip=(),
|
52 | 42 | user_only=user_only):
|
53 | 43 | try:
|
54 |
| - req = FrozenRequirement.from_dist( |
55 |
| - dist, |
56 |
| - dependency_links |
57 |
| - ) |
| 44 | + req = FrozenRequirement.from_dist(dist) |
58 | 45 | except RequirementParseError:
|
59 | 46 | logger.warning(
|
60 | 47 | "Could not parse requirement: %s",
|
@@ -156,7 +143,7 @@ def freeze(
|
156 | 143 | yield str(installation).rstrip()
|
157 | 144 |
|
158 | 145 |
|
159 |
| -def get_requirement_info(dist, dependency_links): |
| 146 | +def get_requirement_info(dist): |
160 | 147 | """
|
161 | 148 | Compute and return values (req, editable, comments) for use in
|
162 | 149 | FrozenRequirement.from_dist().
|
@@ -208,8 +195,8 @@ def __init__(self, name, req, editable, comments=()):
|
208 | 195 | self.comments = comments
|
209 | 196 |
|
210 | 197 | @classmethod
|
211 |
| - def from_dist(cls, dist, dependency_links): |
212 |
| - req, editable, comments = get_requirement_info(dist, dependency_links) |
| 198 | + def from_dist(cls, dist): |
| 199 | + req, editable, comments = get_requirement_info(dist) |
213 | 200 | if req is None:
|
214 | 201 | req = dist.as_requirement()
|
215 | 202 |
|
|
0 commit comments