Skip to content
Snippets Groups Projects
Commit 9d8a27c8 authored by Viktor Vorobev's avatar Viktor Vorobev Committed by Ugo Albanese
Browse files

Merged in NRRPLT-8409-failed-fresh-install (pull request #87)

[NRRPLT-8409] Fix installation from source.

The VIRTUAL_ENV env var got reset by the deactivation of the virtual environment  used by install_template_experiments_requirements and generate_low_resolution_pbr_textures.

* [NRRPLT-8409] save VIRTUAL_ENV before deactivate
* [NRRPLT-8409] note about VIRTUAL_ENV

Approved-by: Ugo Albanese
parent 51b90e13
No related branches found
No related tags found
No related merge requests found
......@@ -284,6 +284,7 @@ function nrp_rebase {
}
function install_template_experiments_requirements {
OLD_VIRTUAL_ENV="${VIRTUAL_ENV}"
echo
echo -------------------------
echo Experiments
......@@ -294,9 +295,11 @@ function install_template_experiments_requirements {
requirements=$HBP/Experiments/template_requirements.txt # TODO(Luc) create $HBP/Experiments/templates and use a requirements.txt file per each template experiment
$PIP_CMD install -r "${requirements}" || { echo EXPERIMENTS: PIP INSTALL ERROR; exit 1; }
deactivate
export VIRTUAL_ENV="${OLD_VIRTUAL_ENV}"
}
function generate_low_resolution_pbr_textures {
OLD_VIRTUAL_ENV="${VIRTUAL_ENV}"
cd "$HBP"
$VIRTUALENV_CMD lower_res || { echo ERROR; exit 1; }
source lower_res/bin/activate
......@@ -305,6 +308,7 @@ function generate_low_resolution_pbr_textures {
python "$HBP"/user-scripts/generatelowrespbr.py
deactivate
rm -rf lower_res
export VIRTUAL_ENV="${OLD_VIRTUAL_ENV}"
}
function process_models {
......
......@@ -58,6 +58,13 @@ export IGN_IP=127.0.0.1
# NRP virtual env
export NRP_VIRTUAL_ENV=$HOME/.opt/platform_venv
export VIRTUAL_ENV=$NRP_VIRTUAL_ENV
# NOTE the usage of the $VIRTUAL_ENV:
# The make target `devinstall` installs NRP Python modules to VIRTUAL_ENV virtual environment.
# One can change the $VIRTUAL_ENV for his/her own puproses,
# but the NRP installation scripts and guides expect to find the artifacts at $NRP_VIRTUAL_ENV
# Note as well, that if you activate and then deactivate virtual environment (even another one),
# then the $VIRTUAL_ENV is unset and no longer available before you define it again.
# Please, keep in mind the value of $VIRTUAL_ENV at different steps of installation/operation.
# gzbridge & gzserver
export PATH=$HOME/.opt/bbp/nrp-services:$PATH
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment