summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorClaudio Bley <claudio.bley@gmail.com>2023-10-30 09:29:07 +0100
committerClaudio Bley <claudio.bley@gmail.com>2023-10-30 09:43:28 +0100
commitc871ce0f51bcc77e033d85204ca77efcb167d356 (patch)
treea35745a82681bf5e043db6ee8c8d970cb578cd7a /pkgs/development/python-modules/rangehttpserver
parent423b31f1b24ec8d82baec9a5bb969da892010e6d (diff)
bazel_6: Fix `pythonBinPath` and `pythonBinPathWithNixHacks` tests
The tests started to fail after the repo-wide python 3.10 -> 3.11 update. This is caused by Bazel's py_binary rule setting the [`PYTHONSAFEPATH`][1] environment variable, which only has an effect for Python >= 3.11. Setting this variable avoids prepending the current working directory and the script's directory. The current test code relied on this behavior and thus failed with: ``` Traceback (most recent call last): File "/build/.cache/bazel/_bazel_build/8bcfff1c77854f2a2b07d1413b0fc106/execroot/our_workspace/bazel-out/k8-fastbuild/bin/python/bin.runfiles/our_workspace/python/bin.py", line 6, in <module> from lib import foo ModuleNotFoundError: No module named 'lib' ``` See also [bazelbuild/bazel#7091][2] [1]: https://docs.python.org/3.11/using/cmdline.html#envvar-PYTHONSAFEPATH [2]: https://github.com/bazelbuild/bazel/issues/7091
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions