Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up pip solves a tad bit #2317

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions metaflow/plugins/pypi/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def solve(self, id_, packages, python, platform):

with tempfile.TemporaryDirectory() as tmp_dir:
report = "{tmp_dir}/report.json".format(tmp_dir=tmp_dir)
implementations, platforms, abis = zip(
interpreter, platforms, abis = zip(
*[
(tag.interpreter, tag.platform, tag.abi)
for tag in pip_tags(python, platform)
Expand All @@ -92,7 +92,8 @@ def solve(self, id_, packages, python, platform):
),
*(chain.from_iterable(product(["--abi"], set(abis)))),
*(chain.from_iterable(product(["--platform"], set(platforms)))),
# *(chain.from_iterable(product(["--implementations"], set(implementations)))),
*(chain.from_iterable(product(["--implementation"], set(["cp"])))),
"--python-version=%s" % python,
]
for package, version in packages.items():
if version.startswith(("<", ">", "!", "~", "@")):
Expand Down Expand Up @@ -205,7 +206,7 @@ def _build(key, package):
shutil.move(os.path.join(path, wheel), target)
metadata["{url}".format(**package)] = target

implementations, platforms, abis = zip(
interpreter, platforms, abis = zip(
*[
(tag.interpreter, tag.platform, tag.abi)
for tag in pip_tags(python, platform)
Expand All @@ -228,7 +229,8 @@ def _build(key, package):
),
*(chain.from_iterable(product(["--abi"], set(abis)))),
*(chain.from_iterable(product(["--platform"], set(platforms)))),
# *(chain.from_iterable(product(["--implementations"], set(implementations)))),
*(chain.from_iterable(product(["--implementation"], set(["cp"])))),
"--python-version=%s" % python,
]
packages = [package for package in packages if not package["require_build"]]
for package in packages:
Expand Down
Loading