|
16 | 16 |
|
17 | 17 |
|
18 | 18 | SETUP_REQUIRES = [ |
19 | | - 'zetup >= 0.2.33', |
| 19 | + 'zetup >= 0.2.34', |
20 | 20 | ] |
21 | 21 |
|
22 | 22 |
|
|
27 | 27 | except ImportError: # no setuptools |
28 | 28 | pass |
29 | 29 | else: |
30 | | - # make sure that setup requirements |
31 | | - # are always correctly resolved and accessible by: |
32 | | - # - pre-processing them one after another |
33 | | - # - recursively resolving their runtime requirements |
34 | | - # - moving any installed eggs to the front of sys.path |
35 | | - # - updating pkg_resources.working_set accordingly |
| 30 | + # Make sure that setup requirements are always correctly resolved and |
| 31 | + # accessible by: |
| 32 | + # - Recursively resolving their runtime requirements |
| 33 | + # - Moving any installed eggs to the front of sys.path |
| 34 | + # - Updating pkg_resources.working_set accordingly |
36 | 35 |
|
37 | 36 | installer = Distribution().fetch_build_egg |
38 | 37 |
|
@@ -68,12 +67,13 @@ def resolve(requirements, parent=None): |
68 | 67 | except (DistributionNotFound, VersionConflict): |
69 | 68 | dist = installer(req) |
70 | 69 | sys.path.insert(0, dist.location) |
71 | | - working_set.entries.insert(0, dist.location) |
72 | | - working_set.by_key[dist.key] = dist |
| 70 | + working_set.add_entry(dist.location) |
73 | 71 | extras = re.match(r'[^#\[]*\[([^#\]]*)\]', req) |
74 | 72 | if extras: |
75 | 73 | extras = list(map(str.strip, extras.group(1).split(','))) |
76 | | - resolve(map(str, dist.requires(extras=extras or ())), qualreq) |
| 74 | + resolve((str(req).split(';')[0] |
| 75 | + for req in dist.requires(extras=extras or ())), |
| 76 | + qualreq) |
77 | 77 |
|
78 | 78 | resolve(SETUP_REQUIRES) |
79 | 79 | zfg = __import__('zetup').Zetup() |
|
0 commit comments