When python-swiftclient is specified as a requirement in a standard requirements.txt, and subsequently a locked_requirements.txt is generated from this requirements file via rules_python's compile_pip_requirements rule, the wheel installation through pip_parse fails due to duplicate definitions of "swift."
The error can be solved by changing the entrypoint name for swiftclient.shell:main or by changing the name of /bin/swift to avoid duplication.
Error output for my machine:
ERROR: /home/hcrosland/Repos/isaac/sdk/extensions/data_ingestion/BUILD:14:13: //extensions/data_ingestion:data_ingestion-pytype depends on @isaac_safety_deps_python_swiftclient//:pkg in repository @isaac_safety_deps_python_swiftclient which failed to fetch. no such package '@isaac_safety_deps_python_swiftclient//': whl_library isaac_safety_deps_python_swiftclient failed: Collecting python-swiftclient==4.1.0
Downloading python_swiftclient-4.1.0-py3-none-any.whl (87 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.8/87.8 kB 12.4 MB/s eta 0:00:00
Saved ./python_swiftclient-4.1.0-py3-none-any.whl
(WARNING: The directory '/home/hcrosland/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/rules_python/python/pip_install/extract_wheels/extract_single_wheel.py", line 104, in <module>
main()
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/rules_python/python/pip_install/extract_wheels/extract_single_wheel.py", line 92, in main
bazel.extract_wheel(
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/rules_python/python/pip_install/extract_wheels/bazel.py", line 364, in extract_wheel
whl.unzip(directory)
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/rules_python/python/pip_install/extract_wheels/wheel.py", line 90, in unzip
installer.install(
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/pypi__installer/installer/_core.py", line 109, in install
record = destination.write_file(
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/pypi__installer/installer/destinations.py", line 203, in write_file
return self.write_to_fs(
File "/home/hcrosland/.cache/dazel/_dazel_hcrosland/external/pypi__installer/installer/destinations.py", line 167, in write_to_fs
raise FileExistsError(message)
FileExistsError: File already exists: ./bin/swift
Fix proposed to branch: master /review. opendev. org/c/openstack /python- swiftclient/ +/864965
Review: https:/