Skip to content

Commit

Permalink
Add framework_path module
Browse files Browse the repository at this point in the history
This allows scripts in the scripts/ directory to get the path to the
mbedtls_framework module in framework/scripts/

Signed-off-by: David Horstmann <[email protected]>
  • Loading branch information
davidhorstmann-arm committed May 3, 2024
1 parent fe7600a commit 87bf7db
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/abi_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

import xml.etree.ElementTree as ET

import framework_path # pylint: disable=unused-import
from mbedtls_framework import build_tree


Expand Down
1 change: 1 addition & 0 deletions scripts/code_size_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
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
Expand Down
17 changes: 17 additions & 0 deletions scripts/framework_path.py
Original file line number Diff line number Diff line change
@@ -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'))
2 changes: 2 additions & 0 deletions scripts/generate_driver_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import argparse
import jsonschema
import jinja2

import framework_path # pylint: disable=unused-import
from mbedtls_framework import build_tree

JSONSchema = NewType('JSONSchema', object)
Expand Down
1 change: 1 addition & 0 deletions scripts/generate_psa_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os
import sys

import framework_path # pylint: disable=unused-import
from mbedtls_framework import build_tree
from mbedtls_framework import macro_collector

Expand Down
2 changes: 2 additions & 0 deletions scripts/generate_ssl_debug_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import os
import textwrap
import argparse

import framework_path # pylint: disable=unused-import
from mbedtls_framework import build_tree


Expand Down
2 changes: 2 additions & 0 deletions scripts/min_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
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(
Expand Down

0 comments on commit 87bf7db

Please sign in to comment.