aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2021-12-14 16:34:05 +0000
committerJeremy Johnson <jeremy.johnson@arm.com>2022-01-06 11:38:19 +0000
commit2ec3494060ffdafec072fe1b2099a8177b8eca6a (patch)
treefbe9d2dfdc4abeff9ba374a90065b7ed98e97509 /scripts
parenta1d49853082f5454144209c1d95dc9203f510746 (diff)
downloadreference_model-2ec3494060ffdafec072fe1b2099a8177b8eca6a.tar.gz
Reorganize verif and create packages
Split generator and runner scripts Add package setup Add py-dev-env.sh/.bash to allow editing source files during dev Update README.md with installation info Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I172fe426d99e2e9aeeacedc8b8f3b6a79c8bd39d
Diffstat (limited to 'scripts')
-rw-r--r--scripts/py-dev-env.bash24
-rw-r--r--scripts/py-dev-env.sh22
-rw-r--r--scripts/xunit/__init__.py3
3 files changed, 49 insertions, 0 deletions
diff --git a/scripts/py-dev-env.bash b/scripts/py-dev-env.bash
new file mode 100644
index 0000000..82c16e3
--- /dev/null
+++ b/scripts/py-dev-env.bash
@@ -0,0 +1,24 @@
+# Copyright (c) 2021-2022 Arm Limited.
+# SPDX-License-Identifier: Apache-2.0
+
+# Source this script to install the python tosa tools as editable:
+# . scripts/py-dev-env.bash
+
+# NOTE: This script is needed to fix up PYTHONPATH due to a bug
+# in setuptools that does not support multiple package_dirs
+# properly: https://github.com/pypa/setuptools/issues/230
+
+if [ -z "$VIRTUAL_ENV" ]; then
+ echo "Please source this within a python virtual env"
+ return
+fi
+
+if [ -e "${BASH_SOURCE[0]}" ]; then
+ SCRIPTS_DIR=$(dirname $(readlink -f "${BASH_SOURCE[0]}"))
+ REFMODEL_DIR=$(dirname "$SCRIPTS_DIR")
+ pip install -e "$REFMODEL_DIR"
+ export PYTHONPATH="$SCRIPTS_DIR:$REFMODEL_DIR/thirdparty/serialization_lib/python"
+ echo "Set PYTHONPATH=$PYTHONPATH"
+else
+ echo "Please source this using bash"
+fi
diff --git a/scripts/py-dev-env.sh b/scripts/py-dev-env.sh
new file mode 100644
index 0000000..904ff80
--- /dev/null
+++ b/scripts/py-dev-env.sh
@@ -0,0 +1,22 @@
+# Copyright (c) 2021-2022 Arm Limited.
+# SPDX-License-Identifier: Apache-2.0
+
+# Source this script to install the python tosa tools as editable:
+# . scripts/py-dev-env.sh
+
+# NOTE: This script is needed to fix up PYTHONPATH due to a bug
+# in setuptools that does not support multiple package_dirs
+# properly: https://github.com/pypa/setuptools/issues/230
+
+if [ -z "$VIRTUAL_ENV" ]; then
+ echo "Please source this within a python virtual env"
+ return
+fi
+
+if [ -e "setup.cfg" ]; then
+ pip install -e .
+ export PYTHONPATH=$PWD/scripts:$PWD/thirdparty/serialization_lib/python
+ echo "Set PYTHONPATH=$PYTHONPATH"
+else
+ echo "Please source this from the root of reference_model"
+fi
diff --git a/scripts/xunit/__init__.py b/scripts/xunit/__init__.py
new file mode 100644
index 0000000..39e9ecc
--- /dev/null
+++ b/scripts/xunit/__init__.py
@@ -0,0 +1,3 @@
+"""Namespace."""
+# Copyright (c) 2021-2022 Arm Limited.
+# SPDX-License-Identifier: Apache-2.0