Create a new directory for non-user-facing scripts Create a directory for scripts that are useful to maintainers, and may be invoked as part of the CI, but are not part of the normal build. These scripts may require a recent Python version and may require additional third-party modules, unlike user-facing scripts where we try to minimize requirements. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/util/requirements.txt b/util/requirements.txt new file mode 100644 index 0000000..7b557b6 --- /dev/null +++ b/util/requirements.txt
@@ -0,0 +1 @@ +# Python module requirements for maintainer utilities
diff --git a/util/scripts_path.py b/util/scripts_path.py new file mode 100644 index 0000000..49c33e7 --- /dev/null +++ b/util/scripts_path.py
@@ -0,0 +1,18 @@ +"""Add our Python library directory to the module search path. + +Usage: + + import scripts_path # pylint: disable=unused-import + from mbedtls_framework 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, + 'scripts'))