PYTHONPATH in dev-env setup

Former-commit-id: a3cf826188
pull/1161/head
Piero Toffanin 2020-09-09 15:24:26 -04:00
rodzic 98963848db
commit 02ec8ede64
2 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -1,6 +1,5 @@
import os
import sys
from opendm import io
import multiprocessing
# Define some needed locations
@ -56,3 +55,8 @@ supported_extensions = {'.jpg','.jpeg','.png', '.tif', '.tiff'}
# Define the number of cores
num_cores = multiprocessing.cpu_count()
# Print python paths if invoked as a script
if __name__ == "__main__":
print("export PYTHONPATH=" + ":".join(python_packages_paths))

Wyświetl plik

@ -12,7 +12,8 @@ if [ "$1" = "--setup" ]; then
touch .setupdevenv
apt install -y vim
chown -R $3:$4 /code /var/www
chown -R $3:$4 /code
chown -R $3:$4 /var/www
fi
echo "Adding $2 to /etc/passwd"
@ -44,7 +45,10 @@ if [ "$1" = "--setup" ]; then
# Colors
echo "alias ls='ls --color=auto'" >> $HOME/.bashrc
su -c bash $2
# Python paths
echo $(python /code/opendm/context.py) >> $HOME/.bashrc
su -c bash $2
exit 0
fi