Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

scasagrande/rules-python-glibc-issue

Repository files navigation

Minimum reproduction for rules_python issue with fetching glibc appropriate wheels

Steps to reproduce

  • clone this repo on a system with glibc <2.33,>=2.28, such as RHEL 8
  • run bazel test :test

Expected results

  • rules_python fetches a glibc appropriate wheel for cryptography
  • the test passes

Actual results

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)
================================================================================

Notes

  • this error goes away with rules_python version <=1.5.4, or if you don't use experimental_index_url in MODULE.bazel

About

minimum repro for rules_python issue fetching incorrect wheels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published