@@ -118,9 +118,9 @@ def _PyRuntimeInfo_init(
118118 "pyc_tag" : pyc_tag ,
119119 "python_version" : python_version ,
120120 "site_init_template" : site_init_template ,
121- "supports_build_time_venv" : supports_build_time_venv ,
122121 "stage2_bootstrap_template" : stage2_bootstrap_template ,
123122 "stub_shebang" : stub_shebang ,
123+ "supports_build_time_venv" : supports_build_time_venv ,
124124 "zip_main_template" : zip_main_template ,
125125 }
126126
@@ -314,6 +314,26 @@ The following substitutions are made during template expansion:
314314"Shebang" expression prepended to the bootstrapping Python stub
315315script used when executing {obj}`py_binary` targets. Does not
316316apply to Windows.
317+ """ ,
318+ "supports_build_time_venv" : """
319+ :type: bool
320+
321+ True if this toolchain supports creating a virtual env at runtime. False if not
322+ or unknown. If build-time venv creation isn't supported, then binaries may
323+ fallback to non-venv solutions or creating a venv at runtime.
324+
325+ In order to have a functionalal virtualenv created at build time, two criteria
326+ must be met:
327+ 1. Specifying that the invoked interpreter (`$venv/bin/python3`, as reported by
328+ `sys.executable`) isn't the real interpreter (e.g. `/usr/bin/python3`). This
329+ typically requires relative symlinks or support for the `PYTHONEXECUTABLE`
330+ environment variable.
331+ 2. Creating a site-packages directory (`sys.prefix`) that the runtime
332+ interpreter will recognize (e.g. `$venv/lib/python{version}/site-packages`).
333+ This typically requires knowing the Python version at build time.
334+
335+ :::{versionadded} VERSION_NEXT_FEATURE
336+ :::
317337""" ,
318338 "zip_main_template" : """
319339:type: File
@@ -335,26 +355,6 @@ The following substitutions are made during template expansion:
335355
336356:::{versionadded} 0.33.0
337357:::
338- """ ,
339- "supports_build_time_venv" : """
340- :type: bool
341-
342- True if this toolchain supports creating a virtual env at runtime. False if not
343- or unknown. If build-time venv creation isn't supported, then binaries may
344- fallback to non-venv solutions or creating a venv at runtime.
345-
346- In order to have a functionalal virtualenv created at build time, two criteria
347- must be met:
348- 1. Specifying that the invoked interpreter (`$venv/bin/python3`, as reported by
349- `sys.executable`) isn't the real interpreter (e.g. `/usr/bin/python3`). This
350- typically requires relative symlinks or support for the `PYTHONEXECUTABLE`
351- environment variable.
352- 2. Creating a site-packages directory (`sys.prefix`) that the runtime
353- interpreter will recognize (e.g. `$venv/lib/python{version}/site-packages`).
354- This typically requires knowing the Python version at build time.
355-
356- :::{versionadded} VERSION_NEXT_FEATURE
357- :::
358358""" ,
359359 },
360360)
0 commit comments