Minimum reproduction for rules_python issue with fetching glibc appropriate wheels
- clone this repo on a system with glibc <2.33,>=2.28, such as RHEL 8
- run
bazel test :test
- rules_python fetches a glibc appropriate wheel for cryptography
- the test passes
The wrong wheel is fetched, resulting in the following traceback
==================== Test output for //:test:
Traceback (most recent call last):
File "/home/steven/.cache/bazel/_bazel_steven/b374902d07d6e97f990a04ec42ca4515/sandbox/linux-sandbox/21/execroot/_main/bazel-out/k8-fastbuild/bin/test.runfiles/_main/test.py", line 1, in <module>
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
File "/home/steven/.cache/bazel/_bazel_steven/b374902d07d6e97f990a04ec42ca4515/sandbox/linux-sandbox/21/execroot/_main/bazel-out/k8-fastbuild/bin/test.runfiles/rules_python++pip+py_deps_311_cryptography_cp311_abi3_manylinux_2_34_x86_64_f4028f29/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py", line 11, in <module>
from cryptography.exceptions import UnsupportedAlgorithm, _Reasons
File "/home/steven/.cache/bazel/_bazel_steven/b374902d07d6e97f990a04ec42ca4515/sandbox/linux-sandbox/21/execroot/_main/bazel-out/k8-fastbuild/bin/test.runfiles/rules_python++pip+py_deps_311_cryptography_cp311_abi3_manylinux_2_34_x86_64_f4028f29/site-packages/cryptography/exceptions.py", line 9, in <module>
from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /home/steven/.cache/bazel/_bazel_steven/b374902d07d6e97f990a04ec42ca4515/sandbox/linux-sandbox/21/execroot/_main/bazel-out/k8-fastbuild/bin/test.runfiles/rules_python++pip+py_deps_311_cryptography_cp311_abi3_manylinux_2_34_x86_64_f4028f29/site-packages/cryptography/hazmat/bindings/_rust.abi3.so)
================================================================================- this error goes away with rules_python version <=1.5.4, or if you don't use experimental_index_url in MODULE.bazel