Skip to content

Commit e49a6fe

Browse files
committed
Added documentation for the python-version option
1 parent bdc11d6 commit e49a6fe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/reference/target-declaration.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ A target specification may have optional parameters, the names and values of whi
4040
- [**no-compile**](#no-compile): If true, then do not invoke a target language compiler. Just generate code.
4141
- [**no-runtime-validation**](#no-runtime-validation): If true, disable runtime validation.
4242
- [**protobufs**](#protobufs): An array of .proto files that are to be compiled and included in the generated code.
43+
- [**python-version**](#python-version): (Python only) A string (with quotation marks) giving an exact Python version to use.
4344
- [**runtime-version**](#runtime-version): Specify which version of the runtime system to use.
4445
- [**rust-include**](#rust-include): (Rust only) A set of Rust modules in the generated project.
4546
- [**scheduler**](#scheduler): (C only) Specification of the scheduler to use.
@@ -514,6 +515,24 @@ included in the generated code. For an example, see
514515
</ShowIf>
515516
</ShowIfs>
516517

518+
## python-version
519+
520+
<ShowIfs>
521+
<ShowIf c rs cpp ts >
522+
This target does not support the `python-version` target option.
523+
</ShowIf>
524+
<ShowIf py>
525+
This argument takes a string (with quotation marks) containing a version number.
526+
This will specify the _version_ of the Python interpreter that the compiled binary will be linked and run with.
527+
For example, to get Python version 3.13.0:
528+
```lf-py
529+
target Python {
530+
python-version: "3.13.0"
531+
}
532+
```
533+
</ShowIf>
534+
</ShowIfs>
535+
517536
## runtime-version
518537

519538
<ShowIfs>

0 commit comments

Comments
 (0)