diff --git a/Dockerfile b/Dockerfile index ace01d604..70d4133bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -128,6 +128,9 @@ RUN apt-get update && \ libpq5 && \ rm -rf /var/lib/apt/lists/* +RUN pip3 install flask gunicorn json5 +RUN pip3 install --user flask_restx pyln-client + ENV LIGHTNINGD_DATA=/root/.lightning ENV LIGHTNINGD_RPC_PORT=9835 ENV LIGHTNINGD_PORT=9735 diff --git a/Makefile b/Makefile index c42b4318d..bd3e419ec 100644 --- a/Makefile +++ b/Makefile @@ -798,7 +798,7 @@ install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $ $(INSTALL_PROGRAM) $(BIN_PROGRAMS) $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(DESTDIR)$(pkglibexecdir) [ -z "$(PLUGINS)" ] || $(INSTALL_PROGRAM) $(PLUGINS) $(DESTDIR)$(plugindir) - for PY in $(PY_PLUGINS); do DIR=`dirname $$PY`; $(INSTALL_PROGRAM) $$DIR/*.py $(DESTDIR)$(plugindir)/`basename $$DIR`; done + for PY in $(PY_PLUGINS); do DIR=`dirname $$PY`; DST=$(DESTDIR)$(plugindir)/`basename $$DIR`; $(INSTALL_PROGRAM) -d $$DIR; cp -a $$DIR $$DST ; done MAN1PAGES = $(filter %.1,$(MANPAGES)) MAN5PAGES = $(filter %.5,$(MANPAGES)) diff --git a/contrib/docker/Dockerfile.arm32v7 b/contrib/docker/Dockerfile.arm32v7 index 59ca33b00..ebe9fe4d1 100644 --- a/contrib/docker/Dockerfile.arm32v7 +++ b/contrib/docker/Dockerfile.arm32v7 @@ -127,6 +127,9 @@ RUN apt-get update && \ libpq5 && \ rm -rf /var/lib/apt/lists/* +RUN pip3 install flask gunicorn json5 +RUN pip3 install --user flask_restx pyln-client + ENV LIGHTNINGD_DATA=/root/.lightning ENV LIGHTNINGD_RPC_PORT=9835 ENV LIGHTNINGD_PORT=9735 diff --git a/contrib/docker/Dockerfile.arm64v8 b/contrib/docker/Dockerfile.arm64v8 index 5ea8f03ec..70e4164af 100644 --- a/contrib/docker/Dockerfile.arm64v8 +++ b/contrib/docker/Dockerfile.arm64v8 @@ -134,6 +134,9 @@ RUN apt-get update && \ libpq5 && \ rm -rf /var/lib/apt/lists/* +RUN pip3 install flask gunicorn json5 +RUN pip3 install --user flask_restx pyln-client + ENV LIGHTNINGD_DATA=/root/.lightning ENV LIGHTNINGD_RPC_PORT=9835 ENV LIGHTNINGD_PORT=9735 diff --git a/contrib/docker/Dockerfile.builder.fedora b/contrib/docker/Dockerfile.builder.fedora index f5fe4d420..81eb3798e 100644 --- a/contrib/docker/Dockerfile.builder.fedora +++ b/contrib/docker/Dockerfile.builder.fedora @@ -1,4 +1,4 @@ -FROM fedora:29 +FROM fedora:35 ENV BITCOIN_VERSION 0.18.1 WORKDIR /tmp @@ -31,4 +31,7 @@ RUN wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_ rm -rf bitcoin.tar.gz bitcoin-$BITCOIN_VERSION RUN python3 -m pip install --upgrade pip && \ - python3 -m pip install python-bitcoinlib==0.10.2 pytest==3.0.5 setuptools==36.6.0 pytest-test-groups==1.0.3 flake8==3.5.0 pytest-rerunfailures==3.1 ephemeral-port-reserve==1.1.0 + python3 -m pip install python-bitcoinlib pytest setuptools pytest-test-groups flake8 pytest-rerunfailures ephemeral-port-reserve + +RUN python3 -m pip install flask gunicorn json5 +RUN python3 -m pip install --user flask_restx pyln-client diff --git a/contrib/docker/scripts/build.sh b/contrib/docker/scripts/build.sh index 61368321b..c9cb48228 100755 --- a/contrib/docker/scripts/build.sh +++ b/contrib/docker/scripts/build.sh @@ -24,6 +24,7 @@ pip3 install --upgrade pip pip3 install --user poetry poetry export --dev --without-hashes -o requirements.txt pip3 install -r requirements.txt +pip3 install -r plugins/clnrest/requirements.txt git clone https://github.com/lightning/bolts.git ../bolts git submodule update --init --recursive diff --git a/contrib/reprobuild/Dockerfile.focal b/contrib/reprobuild/Dockerfile.focal index 80a2ab8e7..c744b55e1 100644 --- a/contrib/reprobuild/Dockerfile.focal +++ b/contrib/reprobuild/Dockerfile.focal @@ -42,6 +42,9 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp && rm /tmp/get-pip.py \ && pip install poetry +RUN pip3 install flask gunicorn json5 +RUN pip3 install --user flask_restx pyln-client + RUN wget https://sh.rustup.rs -O rustup-install.sh && \ bash rustup-install.sh --default-toolchain none --quiet -y && \ rm rustup-install.sh && \ @@ -60,6 +63,7 @@ WORKDIR /build CMD poetry export -o requirements.txt --without-hashes \ && pip install -r requirements.txt \ + && pip install -r plugins/clnrest/requirements.txt \ && mkdir -p /repro \ && cd /repro \ && unzip /build/release/*.zip \ diff --git a/contrib/reprobuild/Dockerfile.jammy b/contrib/reprobuild/Dockerfile.jammy index efd015f23..8181cf8e5 100644 --- a/contrib/reprobuild/Dockerfile.jammy +++ b/contrib/reprobuild/Dockerfile.jammy @@ -17,7 +17,7 @@ RUN apt-get update \ file \ gettext \ git \ - libsqlite3-dev \ + libsqlite3-dev \ libpq-dev \ libsodium23 \ libtool \ @@ -43,6 +43,9 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp && rm /tmp/get-pip.py \ && pip install poetry +RUN pip3 install flask gunicorn json5 +RUN pip3 install --user flask_restx pyln-client + RUN wget https://sh.rustup.rs -O rustup-install.sh && \ bash rustup-install.sh --default-toolchain none --quiet -y && \ rm rustup-install.sh && \ @@ -61,6 +64,7 @@ WORKDIR /build CMD poetry export -o requirements.txt --without-hashes \ && pip install -r requirements.txt \ + && pip install -r plugins/clnrest/requirements.txt \ && mkdir -p /repro \ && cd /repro \ && unzip /build/release/*.zip \ diff --git a/plugins/Makefile b/plugins/Makefile index 85d9e1d83..c0cf0ab1c 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -233,6 +233,9 @@ plugins/sql: $(PLUGIN_SQL_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_ ALL_C_HEADERS += plugins/list_of_builtin_plugins_gen.h PLUGIN_BASES := $(PLUGINS:plugins/%=%) $(PY_PLUGINS:plugins/%=%) +$(info PLUGIN_BASES) +$(info $(PLUGIN_BASES)) + plugins/list_of_builtin_plugins_gen.h: plugins/Makefile Makefile config.vars @$(call VERBOSE,GEN $@,echo "static const char *list_of_builtin_plugins[] = { $(PLUGIN_BASES:%=\"%\",) NULL };" > $@) diff --git a/tools/build-release.sh b/tools/build-release.sh index 67c689b82..670ffa251 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -8,6 +8,7 @@ if [ "$1" = "--inside-docker" ]; then PLTFM="$3" git clone /src /build cd /build + pip3 install -r plugins/clnrest/requirements.txt ./configure make VERSION="$VER" make install DESTDIR=/"$VER-$PLTFM" RUST_PROFILE=release