Skip to content

Conversation

@jlojosnegros
Copy link

Add documentation for known issue with hermetic Python toolchains that can cause placeholder expansion errors when using py_binary.

The issue occurs when projects use custom hermetic Python interpreters (e.g., @python3_12_host//:python) where rules_python placeholder expansion fails, causing errors like:
python3: can't open file '%interpreter_args%'

This affects large C++ projects like Envoy proxy and TensorFlow that use hermetic Python in containerized build environments.

Document three workaround options:

  1. Use system Python for development tooling
  2. Manual sh_binary wrapper to bypass rules_python templating
  3. Fork and patch for organizational needs

Related: #165, #245, #168

Add documentation for known issue with hermetic Python toolchains that
can cause placeholder expansion errors when using py_binary.

The issue occurs when projects use custom hermetic Python interpreters
(e.g., @python3_12_host//:python) where rules_python placeholder
expansion fails, causing errors like:
  python3: can't open file '%interpreter_args%'

This affects large C++ projects like Envoy proxy and TensorFlow that
use hermetic Python in containerized build environments.

Document three workaround options:
1. Use system Python for development tooling
2. Manual sh_binary wrapper to bypass rules_python templating
3. Fork and patch for organizational needs

Related: hedronvision#165, hedronvision#245, hedronvision#168
Signed-off-by: Jose Luis Ojosnegros Manchón <jl.ojosnegros.manchon@gmail.com>
@jlojosnegros jlojosnegros force-pushed the doc/hermetic-python-workaround branch from a003f4c to 59b94d5 Compare October 30, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant