Skip to content

Commit 87bf7db

Browse files
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 <[email protected]>
1 parent fe7600a commit 87bf7db

File tree

7 files changed

+26
-0
lines changed

7 files changed

+26
-0
lines changed

scripts/abi_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101

102102
import xml.etree.ElementTree as ET
103103

104+
import framework_path # pylint: disable=unused-import
104105
from mbedtls_framework import build_tree
105106

106107

scripts/code_size_compare.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import typing
2222
from enum import Enum
2323

24+
import framework_path # pylint: disable=unused-import
2425
from mbedtls_framework import build_tree
2526
from mbedtls_framework import logging_util
2627
from mbedtls_framework import typing_util

scripts/framework_path.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""Add our Python library directory to the module search path.
2+
3+
Usage:
4+
5+
import framework_path # pylint: disable=unused-import
6+
"""
7+
8+
# Copyright The Mbed TLS Contributors
9+
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10+
#
11+
12+
import os
13+
import sys
14+
15+
sys.path.append(os.path.join(os.path.dirname(__file__),
16+
os.path.pardir,
17+
'framework', 'scripts'))

scripts/generate_driver_wrappers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import argparse
1818
import jsonschema
1919
import jinja2
20+
21+
import framework_path # pylint: disable=unused-import
2022
from mbedtls_framework import build_tree
2123

2224
JSONSchema = NewType('JSONSchema', object)

scripts/generate_psa_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818
import sys
1919

20+
import framework_path # pylint: disable=unused-import
2021
from mbedtls_framework import build_tree
2122
from mbedtls_framework import macro_collector
2223

scripts/generate_ssl_debug_helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import os
1515
import textwrap
1616
import argparse
17+
18+
import framework_path # pylint: disable=unused-import
1719
from mbedtls_framework import build_tree
1820

1921

scripts/min_requirements.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import typing
1515

1616
from typing import List, Optional
17+
18+
import framework_path # pylint: disable=unused-import
1719
from mbedtls_framework import typing_util
1820

1921
def pylint_doesn_t_notice_that_certain_types_are_used_in_annotations(

0 commit comments

Comments
 (0)