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

Supply the extra pip args in the resolver. #6006

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

matteius
Copy link
Member

@matteius matteius commented Nov 5, 2023

Extra pip args were never passed to the resolver. The way this PR does it, allows it to work for both the default resolver in sub-process and resolver in parent process options.

The issue

Fixes #6001

The fix

Example of using this branch:

$ pipenv install --verbose --extra-pip-args "--platform=win_amd64 --target C:\\c\\Users\\matte\\.virtualenvs\\issue-6001-WKuyds7q\\Lib\\site-packages\\"  tensorflow
Installing tensorflow...
Resolving tensorflow...
Installation Succeeded
Installing dependencies from Pipfile.lock (3b7552)...

[...]

Successfully installed absl-py-2.0.0 astunparse-1.6.3 cachetools-5.3.2 flatbuffers-23.5.26 gast-0.5.4 google-auth-2.23.4 google-auth-oauthlib-1.0.0 google-pasta-0.2.0 grpcio-1.59.2 h5py-3.10.0 keras-2.14.0
libclang-16.0.6 markdown-3.5.1 markupsafe-2.1.3 ml-dtypes-0.2.0 numpy-1.26.1 oauthlib-3.2.2 opt-einsum-3.3.0 packaging-23.2 protobuf-4.25.0 pyasn1-0.5.0 pyasn1-modules-0.3.0 requests-oauthlib-1.3.1 rsa-4.9
six-1.16.0 tensorboard-2.14.1 tensorboard-data-server-0.7.2 tensorflow-2.14.0 tensorflow-estimator-2.14.0 tensorflow-intel-2.14.0 tensorflow-io-gcs-filesystem-0.31.0 termcolor-2.3.0 typing-extensions-4.8.0
werkzeug-3.0.1 wheel-0.41.3 wrapt-1.14.1

Install Phase: Editable Requirements
[...]

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@matteius matteius requested a review from oz123 November 14, 2023 22:42
@matteius matteius marked this pull request as ready for review November 14, 2023 22:48
@matteius matteius changed the title Use the extra pip args in the resolver. Supply the extra pip args in the resolver. Nov 14, 2023
@@ -110,6 +114,7 @@ def upgrade(
categories=None,
dev=False,
lock_only=False,
extra_pip_args=None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is extra_pip_args passed here? Is it a dict or a string?

Can you add a test for that? Or at least a comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is a string, I'll revisit soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--extra-pip-args doesn't pick up --platform option for pip correclty.
2 participants