Description
🐞 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 both pip.parse
calls, it fails.
🔬 Minimal Reproduction
- I'll put together a minimum repro repo when I get a chance
Here's an excerpt from MODULE.bazel:
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
experimental_extra_index_urls = PYPI_EXTRA_INDEX_URLS,
experimental_index_url = PYPI_INDEX_URL,
experimental_requirement_cycles = base_requirement_cycles,
extra_pip_args = pip_parse_extra_pip_args,
hub_name = "third_party_python_base",
python_version = "3.9",
requirements_darwin = "//third_party/python/base:requirements_3_9_darwin.txt",
requirements_linux = "//third_party/python/base:requirements_3_9.txt",
)
pip.parse(
experimental_extra_index_urls = PYPI_EXTRA_INDEX_URLS,
experimental_index_url = PYPI_INDEX_URL,
experimental_requirement_cycles = base_requirement_cycles,
extra_pip_args = pip_parse_extra_pip_args,
hub_name = "third_party_python_base",
python_version = "3.11",
requirements_darwin = "//third_party/python/base:requirements_3_11_darwin.txt",
requirements_linux = "//third_party/python/base:requirements_3_11.txt",
)
🔥 Exception or Error
ERROR: /home/user/.cache/bazel/…/6cbf57f86cd7ffd2869796107fcd24ff/external/rules_python~/python/private/pypi/extension.bzl:247:25: Traceback (most recent call last):
File "/home/user/.cache/bazel/…/6cbf57f86cd7ffd2869796107fcd24ff/external/rules_python~/python/private/pypi/extension.bzl", line 610, column 25, in _pip_impl
mods = parse_modules(module_ctx)
File "/home/user/.cache/bazel/…/6cbf57f86cd7ffd2869796107fcd24ff/external/rules_python~/python/private/pypi/extension.bzl", line 485, column 36, in parse_modules
out = _create_whl_repos(
File "/home/user/.cache/bazel/…/6cbf57f86cd7ffd2869796107fcd24ff/external/rules_python~/python/private/pypi/extension.bzl", line 247, column 25, in _create_whl_repos
fail("Attempting to creating a duplicate library {} for {}".format(
Error in fail: Attempting to creating a duplicate library third_party_python_base_311_python_bidi_sdist_0665a082 for python_bidi
🌍 Your Environment
Operating System:
Linux
Output of bazel version
:
Build label: 7.4.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Nov 11 21:24:53 2024 (1731360293)
Build timestamp: 1731360293
Build timestamp as int: 1731360293
Rules_python version:
1.2.0
Anything else relevant?