Skip to content

Commit ee854f3

Browse files
committed
changes
1 parent b9d0249 commit ee854f3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

metaflow/plugins/pypi/pip.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def solve(self, id_, packages, python, platform):
6868

6969
with tempfile.TemporaryDirectory() as tmp_dir:
7070
report = "{tmp_dir}/report.json".format(tmp_dir=tmp_dir)
71-
implementations, platforms, abis = zip(
71+
interpreter, platforms, abis = zip(
7272
*[
7373
(tag.interpreter, tag.platform, tag.abi)
7474
for tag in pip_tags(python, platform)
@@ -92,7 +92,8 @@ def solve(self, id_, packages, python, platform):
9292
),
9393
*(chain.from_iterable(product(["--abi"], set(abis)))),
9494
*(chain.from_iterable(product(["--platform"], set(platforms)))),
95-
# *(chain.from_iterable(product(["--implementations"], set(implementations)))),
95+
*(chain.from_iterable(product(["--implementation"], set(["cp"])))),
96+
"--python-version=%s" % python,
9697
]
9798
for package, version in packages.items():
9899
if version.startswith(("<", ">", "!", "~", "@")):
@@ -106,9 +107,9 @@ def solve(self, id_, packages, python, platform):
106107
except PipPackageNotFound as ex:
107108
# pretty print package errors
108109
raise PipException(
109-
"Unable to find a binary distribution compatible with %s for %s.\n\n"
110+
"Unable to find a binary distribution compatible with %s for %s.\n\n %s"
110111
"Note: ***@pypi*** does not currently support source distributions"
111-
% (ex.package_spec, platform)
112+
% (ex.package_spec, platform, ex.error)
112113
)
113114

114115
def _format(dl_info):
@@ -205,7 +206,7 @@ def _build(key, package):
205206
shutil.move(os.path.join(path, wheel), target)
206207
metadata["{url}".format(**package)] = target
207208

208-
implementations, platforms, abis = zip(
209+
interpreter, platforms, abis = zip(
209210
*[
210211
(tag.interpreter, tag.platform, tag.abi)
211212
for tag in pip_tags(python, platform)
@@ -228,7 +229,8 @@ def _build(key, package):
228229
),
229230
*(chain.from_iterable(product(["--abi"], set(abis)))),
230231
*(chain.from_iterable(product(["--platform"], set(platforms)))),
231-
# *(chain.from_iterable(product(["--implementations"], set(implementations)))),
232+
*(chain.from_iterable(product(["--implementation"], set(["cp"])))),
233+
"--python-version=%s" % python,
232234
]
233235
packages = [package for package in packages if not package["require_build"]]
234236
for package in packages:

0 commit comments

Comments
 (0)