Add requirement on Jinja to integrate drivers

Driver implementers need to regenerate wrappers. This will use Jinja2 as
discussed in
https://github.com/ARMmbed/mbedtls/pull/5067#discussion_r738794607

On the development branch, driver integration is always needed to generate
the driver wrapper and thus to build the library, so this requirement
applies to everyone, not just driver implementers. In releases, we plan to
include a default driver wrapper with support for basic use cases only,
meaning that the line `-r driver.requirements.txt` should be removed from
`basic.requirements.txt` in releases.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-11-17 19:17:03 +01:00
parent 9c82cd9f43
commit 87485a3f28
4 changed files with 20 additions and 1 deletions

View File

@ -59,7 +59,10 @@ The source code of Mbed TLS includes some files that are automatically generated
The following tools are required:
* Perl, for some library source files and for Visual Studio build files.
* Python 3, for some sample programs and test data.
* Python 3 and some Python packages, for some library source files, sample programs and test data. To install the necessary packages, run
```
python -m pip install -r scripts/basic.requirements.txt
```
* A C compiler for the host platform, for some test data.
If you are cross-compiling, you must set the `CC` environment variable to a C compiler for the host platform when generating the configuration-independent files.

View File

@ -0,0 +1,5 @@
# Python modules required to build Mbed TLS in ordinary conditions.
# Required to (re-)generate source files. Not needed if the generated source
# files are already present and up-to-date.
-r driver.requirements.txt

View File

@ -1,5 +1,7 @@
# Python package requirements for Mbed TLS testing.
-r driver.requirements.txt
# Use a known version of Pylint, because new versions tend to add warnings
# that could start rejecting our code.
# 2.4.4 is the version in Ubuntu 20.04. It supports Python >=3.5.

View File

@ -0,0 +1,9 @@
# Python package requirements for driver implementers.
# Use the version of Jinja that's in Ubuntu 20.04.
# See https://github.com/ARMmbed/mbedtls/pull/5067#discussion_r738794607 .
# Note that Jinja2 3.0 drops support for Python 3.5, so we need 2.x.
Jinja2 >= 2.10.1
# Jinja2 >=2.10, <<3.0 needs a separate package for type annotations
types-Jinja2