Commit f480b09b authored by u214892's avatar u214892
Browse files

#71 one-click-installer-runner

parent 719eaff3
Pipeline #1178 failed with stage
in 6 minutes and 14 seconds
@echo on
set PWD_BEFORE=%cd%
@echo off
echo "************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
@echo on
git --version || goto :error
python3 --version || goto :error
@echo off
echo "************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
@echo on
set FLATLAND_BASEDIR=%~dp0\..
set WORKON_HOME=%FLATLAND_BASEDIR%\getting_started\envs_win
if not exist "%WORKON_HOME%" md "%WORKON_HOME%" || goto :error
cd "%WORKON_HOME%"
rem use venv instead of virtualenv/virtualenv-wrapper because of https://github.com/pypa/virtualenv/issues/355
python3 -m venv flatland || goto :error
rem ignore activation error: https://stackoverflow.com/questions/51358202/python-3-7-activate-venv-error-parameter-format-not-correct-65001-windows
call "%WORKON_HOME%\flatland\Scripts\activate.bat" || true
@echo off
echo "************ INSTALL FLATLAND IN THE VIRTUALENV *************************"
@echo on
python -m pip install --upgrade pip || goto :error
cd %FLATLAND_BASEDIR% || goto :error
python setup.py install || goto :error
REM ensure jupyter is installed in the virtualenv
pip install -r "%FLATLAND_BASEDIR%/requirements_dev.txt" -r "%FLATLAND_BASEDIR%\requirements_continuous_integration.txt" || goto :error
@echo off
echo "************ INSTALL JUPYTER EXTENSION *************************"
@echo on
jupyter nbextension install --py --sys-prefix widgetsnbextension || goto :error
jupyter nbextension enable --py --sys-prefix widgetsnbextension || goto :error
jupyter nbextension install --py --sys-prefix jpy_canvas || goto :error
jupyter nbextension enable --py --sys-prefix jpy_canvas || goto :error
jupyter notebook || goto :error
goto :EOF
:error
echo Failed with error #%errorlevel%.
cd "%PWD_BEFORE%" || true
deactivate || true
pause
#!/usr/bin/env bash
set -e # stop on error
set -x # echo commands
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
FLATLAND_BASEDIR=$(dirname "$0")/..
FLATLAND_BASEDIR=$(realpath "$FLATLAND_BASEDIR")
echo "BASEDIR=${FLATLAND_BASEDIR}"
set +x
echo "************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
set -x
set +x
echo "************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
set -x
export WORKON_HOME=${FLATLAND_BASEDIR}/getting_started/envs
echo WORKON_HOME=$WORKON_HOME
echo PWD=$PWD
mkdir -p ${WORKON_HOME}
# cannot work with virtualenvwrapper in script
cd ${WORKON_HOME}
python3 -m venv flatland
source flatland/bin/activate
set +x
echo "************ INSTALL FLATLAND IN THE VIRTUALENV *************************"
set -x
cd ${FLATLAND_BASEDIR}
python setup.py install
# ensure jupyter is installed in the virtualenv
pip install -r ${FLATLAND_BASEDIR}/requirements_dev.txt -r requirements_continuous_integration.txt
set +x
echo "************ INSTALL JUPYTER EXTENSION *************************"
set -x
jupyter nbextension install --py --sys-prefix widgetsnbextension
jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension install --py --sys-prefix jpy_canvas
jupyter nbextension enable --py --sys-prefix jpy_canvas
jupyter notebook
......@@ -8,6 +8,7 @@ import sys
from setuptools import setup, find_packages
assert sys.version_info >= (3, 6)
with open('README.rst') as readme_file:
readme = readme_file.read()
......
Markdown is supported
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