diff --git a/docs/reference/target-declaration.mdx b/docs/reference/target-declaration.mdx index bc936a7fd..d2e547802 100644 --- a/docs/reference/target-declaration.mdx +++ b/docs/reference/target-declaration.mdx @@ -40,6 +40,7 @@ A target specification may have optional parameters, the names and values of whi - [**no-compile**](#no-compile): If true, then do not invoke a target language compiler. Just generate code. - [**no-runtime-validation**](#no-runtime-validation): If true, disable runtime validation. - [**protobufs**](#protobufs): An array of .proto files that are to be compiled and included in the generated code. +- [**python-version**](#python-version): (Python only) A string (with quotation marks) giving an exact Python version to use. - [**runtime-version**](#runtime-version): Specify which version of the runtime system to use. - [**rust-include**](#rust-include): (Rust only) A set of Rust modules in the generated project. - [**scheduler**](#scheduler): (C only) Specification of the scheduler to use. @@ -514,6 +515,24 @@ included in the generated code. For an example, see +## python-version + + + +This target does not support the `python-version` target option. + + +This argument takes a string (with quotation marks) containing a version number. +This will specify the _version_ of the Python interpreter that the compiled binary will be linked and run with. +For example, to get Python version 3.13.0: +```lf-py +target Python { + python-version: "3.13.0" +} +``` + + + ## runtime-version diff --git a/docs/reference/target-language-details.mdx b/docs/reference/target-language-details.mdx index efc4f5421..116af889c 100644 --- a/docs/reference/target-language-details.mdx +++ b/docs/reference/target-language-details.mdx @@ -103,7 +103,9 @@ The following tools are required in order to compile the generated C++ source co -To use this target, install Python 3 on your machine. See [downloading Python](https://wiki.python.org/moin/BeginnersGuide/Download). +To use this target, install Python 3 on your machine. +The target has been tested using Python 3.10, 3.11, 3.12, and 3.13; the nightly regression tests use Python version 3.10.0. +See [downloading Python](https://wiki.python.org/moin/BeginnersGuide/Download). **NOTE:** The Python target requires a C implementation of Python (nicknamed CPython). This is what you will get if you use the above link, or with most of the alternative Python installations such as Anaconda. See [Python download alternatives](https://www.python.org/download/alternatives/) for more details.