Merge pull request #352 from mithro/master

Enter env in environment.sh
This commit is contained in:
Tim Ansell 2018-12-17 19:18:20 -08:00 committed by GitHub
commit 9385717c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -7,9 +7,9 @@ TCL_FORMAT ?= utils//tcl-reformat.sh
IN_ENV = if [ -e env/bin/activate ]; then . env/bin/activate; fi;
env:
virtualenv --python=python3 --system-site-packages env
. env/bin/activate; pip install -r requirements.txt
$(IN_ENV) pip install -r requirements.txt
ln -sf $(PWD)/prjxray env/lib/python3.*/site-packages/
. env/bin/activate; python -c "import yaml" || (echo "Unable to find python-yaml" && exit 1)
$(IN_ENV) python -c "import yaml" || (echo "Unable to find python-yaml" && exit 1)
build:
git submodule update --init --recursive

View File

@ -10,6 +10,10 @@ export XRAY_DIR="$( dirname "$XRAY_UTILS_DIR" )"
export XRAY_DATABASE_DIR="${XRAY_DIR}/database"
export XRAY_TOOLS_DIR="${XRAY_DIR}/build/tools"
if [ -e "${XRAY_DIR}/env/bin/activate" ]; then
source "${XRAY_DIR}/env/bin/activate"
fi
# misc
export XRAY_PART_YAML="${XRAY_DATABASE_DIR}/${XRAY_DATABASE}/${XRAY_PART}.yaml"
export PYTHONPATH="${XRAY_DIR}:${XRAY_DIR}/third_party/fasm:$PYTHONPATH"