diff --git a/scripts/install_build_environment.sh b/scripts/install_build_environment.sh index 628235e70..2d2732ba1 100755 --- a/scripts/install_build_environment.sh +++ b/scripts/install_build_environment.sh @@ -23,28 +23,32 @@ if [ -n "`uname -a | grep -i arch`" ] then sudo pacman -Sy --noconfirm \ python \ + python-pip \ make \ m4 \ gcc \ patch \ bubblewrap \ rsync \ - curl + curl fi if [ -n "`uname -a | grep -i ubuntu`" ] then sudo apt-get install -y make \ python3 \ + python3-pip \ make \ m4 \ gcc \ patch \ bubblewrap \ rsync \ - curl + curl fi - + +pip3 install future-fstrings + if [ -n "`uname -a | grep -i ubuntu`" ] then echo "ubuntu" diff --git a/scripts/install_native_dependencies.sh b/scripts/install_native_dependencies.sh index f12e76cb2..7bba33e4b 100755 --- a/scripts/install_native_dependencies.sh +++ b/scripts/install_native_dependencies.sh @@ -8,6 +8,7 @@ then pacman -Sy sudo pacman -S --noconfirm \ python \ + python-pip \ libevdev \ perl \ pkg-config \ @@ -23,6 +24,7 @@ else apt-get update -qq apt-get -y -qq install \ python3 \ + python3-pip \ libev-dev \ perl \ pkg-config \ @@ -34,3 +36,5 @@ else rsync \ git fi + +pip3 install future-fstrings diff --git a/src/stages/adt_generator/README b/src/stages/adt_generator/README index 2d1b53c3d..569519323 100644 --- a/src/stages/adt_generator/README +++ b/src/stages/adt_generator/README @@ -4,4 +4,4 @@ Build & test with: Run with - python ./generator.py + python3 ./generator.py diff --git a/src/stages/adt_generator/dune b/src/stages/adt_generator/dune index d70d8647e..0c9b430b6 100644 --- a/src/stages/adt_generator/dune +++ b/src/stages/adt_generator/dune @@ -1,8 +1,14 @@ +(rule + (target generator_fstrings.py) + (deps generator.py) + (action (with-stdout-to generator_fstrings.py (run sh -c "if python3 -c 'f\"\"' 2>/dev/null; then :; else echo '# -*- coding: future_fstrings -*-'; fi; cat generator.py"))) +) + (rule (target generated_fold.ml) - (deps generator.py) - (action (with-stdout-to generated_fold.ml (run python3 ./generator.py))) -; (mode (promote (until-clean))) ; If this is uncommented, then "dune build -p ligo" can't find the file (but "dune build" can) + (deps generator_fstrings.py) + (action (with-stdout-to generated_fold.ml (run python3 ./generator_fstrings.py))) + (mode (promote (until-clean))) ) ; (library ; (name adt_generator) diff --git a/tools/webide/Dockerfile b/tools/webide/Dockerfile index 1b62aefaf..45d320aa5 100644 --- a/tools/webide/Dockerfile +++ b/tools/webide/Dockerfile @@ -21,7 +21,8 @@ FROM node:12-buster WORKDIR /app -RUN apt-get update && apt-get -y install python3 libev-dev perl pkg-config libgmp-dev libhidapi-dev m4 libcap-dev bubblewrap rsync +RUN apt-get update && apt-get -y install python3 python3-pip libev-dev perl pkg-config libgmp-dev libhidapi-dev m4 libcap-dev bubblewrap rsync +RUN pip3 install future-fstrings COPY ligo_deb10.deb /tmp/ligo_deb10.deb RUN dpkg -i /tmp/ligo_deb10.deb && rm /tmp/ligo_deb10.deb