-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
experimental_index_url can only be used in one pip.parse(), subsequent calls fail #2648
Comments
Ah yes, the sdist repos need to be prefixed/suffixed with the python version. The fix should be reasonably easy - only the repo name should be updated. PRs are welcome here if someone needs this before I can take a look at it. |
Thanks for the quick response. Making a reproduction was more difficult than I expected. I'm assuming you mean somewhere in the following lines, is that right? |
Yes, exactly. I think passing |
For reference this comment was wrong, it is unclear yet why this is happening. |
More debug information on the 2nd sdist, logged on the line:https://github.com/bazelbuild/rules_python/blob/e7d2f09394dd14816310c4c661d2fefab33b2b1b/python/private/pypi/extension.bzl#L246
Key part is that the |
Is there a bug in
I think we need to fix the Another option is to handle this at the extension level where the extension is not blindly creating sdists, but that option is less appealing to me because the former is easier to test. |
Yes, this was exactly the issue. The lines are slightly different, with one hash appearing on darwin lock file but not linux linux lock file, and one hash appearing on linux but not the darwin. When I initially tried to create the reproduction, I wasn't using the exact same set of hashes as my main repo. |
Took a stab at fixing it via #2658 but looks like it breaks some behavior on mac/universal, and any whls. Potentially due to extension.bzl's handling. Let me know what you think. |
🐞 bug report
Affected Rule
pip.parse()
Is this a regression?
I'm not sure.
Description
I have 4 lock files for 2 different Python versions over 2 platforms. When I try to use
experimental_index_url
on bothpip.parse
calls, it fails.🔬 Minimal Reproduction
Here's an excerpt from MODULE.bazel:
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: