@@ -83,16 +83,8 @@ def solve(self, id_, packages, python, platform):
83
83
def _format_item (item ):
84
84
dl_info = item ["download_info" ]
85
85
res = {k : v for k , v in dl_info .items () if k in ["url" ]}
86
- # Infer wheel name from url
87
- res ["wheel_name" ] = res ["url" ].split ("/" )[- 1 ]
88
- res ["require_build" ] = False
89
- # If wheel name is not a wheel, we need to build the target. Construct a wheel name and add a build flag
90
- if not res ["wheel_name" ].endswith (".whl" ):
91
- res ["wheel_name" ] = "{name}-{version}.whl" .format (
92
- name = item ["metadata" ]["name" ],
93
- version = item ["metadata" ]["version" ],
94
- )
95
- res ["require_build" ] = True
86
+ # If source url is not a wheel, we need to build the target. Add a build flag.
87
+ res ["require_build" ] = not res ["url" ].endswith (".whl" )
96
88
97
89
# reconstruct the VCS url and pin to current commit_id
98
90
# so using @branch as a version acts somewhat as expected.
@@ -191,7 +183,6 @@ def download(self, id_, packages, python, platform):
191
183
"download" ,
192
184
"--no-deps" ,
193
185
"--no-index" ,
194
- "--no-build-isolation" , # required when using --no-index for setuptools to be found.
195
186
"--progress-bar=off" ,
196
187
# if packages are present in Pip cache, this will be a local copy
197
188
"--dest=%s/.pip/wheels" % prefix ,
@@ -210,7 +201,7 @@ def download(self, id_, packages, python, platform):
210
201
cmd .append (package ["url" ])
211
202
# record the url-to-path mapping fo wheels in metadata file.
212
203
metadata [package ["url" ]] = "{prefix}/.pip/wheels/{wheel}" .format (
213
- prefix = prefix , wheel = package ["wheel_name" ]
204
+ prefix = prefix , wheel = package ["url" ]. split ( "/" )[ - 1 ]
214
205
)
215
206
self ._call (prefix , cmd )
216
207
# write the url to wheel mappings in a magic location
@@ -243,7 +234,7 @@ def create(self, id_, packages, python, platform):
243
234
244
235
def metadata (self , id_ , packages , python , platform ):
245
236
# read the url to wheel mappings from a magic location.
246
- # Combine the metadata and build_metadata files, allowing build_metadata mappings to override .
237
+ # Combine the metadata and build_metadata files (these should be disjoint sets) .
247
238
prefix = self .micromamba .path_to_environment (id_ )
248
239
metadata_file = METADATA_FILE .format (prefix = prefix )
249
240
build_metadata_file = BUILD_METADATA_FILE .format (prefix = prefix )
0 commit comments