diff options
author | David Horstmann <david.horstmann@arm.com> | 2024-05-03 14:50:58 +0100 |
---|---|---|
committer | David Horstmann <david.horstmann@arm.com> | 2024-05-13 14:43:38 +0100 |
commit | 875c32fa072fe9eac8b105fa0007d55b5f95eb92 (patch) | |
tree | 7a33eeb86cd99703ffb55cf64c09ffaa98994aff /scripts | |
parent | cd84bb287b635230aa96ae8d663516f47a690c64 (diff) | |
download | mbedtls-875c32fa072fe9eac8b105fa0007d55b5f95eb92.zip mbedtls-875c32fa072fe9eac8b105fa0007d55b5f95eb92.tar.gz mbedtls-875c32fa072fe9eac8b105fa0007d55b5f95eb92.tar.bz2 |
Add framework_path module
This allows scripts in the scripts/ directory to get the path to the
mbedtls_framework module in framework/scripts/
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/abi_check.py | 1 | ||||
-rwxr-xr-x | scripts/code_size_compare.py | 1 | ||||
-rw-r--r-- | scripts/framework_path.py | 17 | ||||
-rwxr-xr-x | scripts/generate_driver_wrappers.py | 2 | ||||
-rwxr-xr-x | scripts/generate_psa_constants.py | 1 | ||||
-rwxr-xr-x | scripts/generate_ssl_debug_helpers.py | 2 | ||||
-rwxr-xr-x | scripts/min_requirements.py | 2 |
7 files changed, 26 insertions, 0 deletions
diff --git a/scripts/abi_check.py b/scripts/abi_check.py index d3d2bd0..5a52d87 100755 --- a/scripts/abi_check.py +++ b/scripts/abi_check.py @@ -101,6 +101,7 @@ from types import SimpleNamespace import xml.etree.ElementTree as ET +import framework_path # pylint: disable=unused-import from mbedtls_framework import build_tree diff --git a/scripts/code_size_compare.py b/scripts/code_size_compare.py index eefda31..4dede0f 100755 --- a/scripts/code_size_compare.py +++ b/scripts/code_size_compare.py @@ -21,6 +21,7 @@ import sys import typing from enum import Enum +import framework_path # pylint: disable=unused-import from mbedtls_framework import build_tree from mbedtls_framework import logging_util from mbedtls_framework import typing_util diff --git a/scripts/framework_path.py b/scripts/framework_path.py new file mode 100644 index 0000000..2bcf46f --- /dev/null +++ b/scripts/framework_path.py @@ -0,0 +1,17 @@ +"""Add our Python library directory to the module search path. + +Usage: + + import framework_path # pylint: disable=unused-import +""" + +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later +# + +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), + os.path.pardir, + 'framework', 'scripts')) diff --git a/scripts/generate_driver_wrappers.py b/scripts/generate_driver_wrappers.py index ec79c4e..7bcac84 100755 --- a/scripts/generate_driver_wrappers.py +++ b/scripts/generate_driver_wrappers.py @@ -17,6 +17,8 @@ from traceback import format_tb import argparse import jsonschema import jinja2 + +import framework_path # pylint: disable=unused-import from mbedtls_framework import build_tree JSONSchema = NewType('JSONSchema', object) diff --git a/scripts/generate_psa_constants.py b/scripts/generate_psa_constants.py index 119a632..b20bae1 100755 --- a/scripts/generate_psa_constants.py +++ b/scripts/generate_psa_constants.py @@ -17,6 +17,7 @@ file is written: import os import sys +import framework_path # pylint: disable=unused-import from mbedtls_framework import build_tree from mbedtls_framework import macro_collector diff --git a/scripts/generate_ssl_debug_helpers.py b/scripts/generate_ssl_debug_helpers.py index 80d2fc7..a6d1b13 100755 --- a/scripts/generate_ssl_debug_helpers.py +++ b/scripts/generate_ssl_debug_helpers.py @@ -14,6 +14,8 @@ import re import os import textwrap import argparse + +import framework_path # pylint: disable=unused-import from mbedtls_framework import build_tree diff --git a/scripts/min_requirements.py b/scripts/min_requirements.py index c588a01..2172c5d 100755 --- a/scripts/min_requirements.py +++ b/scripts/min_requirements.py @@ -14,6 +14,8 @@ import tempfile import typing from typing import List, Optional + +import framework_path # pylint: disable=unused-import from mbedtls_framework import typing_util def pylint_doesn_t_notice_that_certain_types_are_used_in_annotations( |