Jeremy Johnson | 2ec3494 | 2021-12-14 16:34:05 +0000 | [diff] [blame] | 1 | # Copyright (c) 2021-2022 Arm Limited. |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | # Source this script to install the python tosa tools as editable: |
| 5 | # . scripts/py-dev-env.sh |
| 6 | |
| 7 | # NOTE: This script is needed to fix up PYTHONPATH due to a bug |
| 8 | # in setuptools that does not support multiple package_dirs |
| 9 | # properly: https://github.com/pypa/setuptools/issues/230 |
| 10 | |
| 11 | if [ -z "$VIRTUAL_ENV" ]; then |
| 12 | echo "Please source this within a python virtual env" |
| 13 | return |
| 14 | fi |
| 15 | |
| 16 | if [ -e "setup.cfg" ]; then |
| 17 | pip install -e . |
| 18 | export PYTHONPATH=$PWD/scripts:$PWD/thirdparty/serialization_lib/python |
| 19 | echo "Set PYTHONPATH=$PYTHONPATH" |
| 20 | else |
| 21 | echo "Please source this from the root of reference_model" |
| 22 | fi |