diff --git a/Makefile b/Makefile index 14bd27456b7c..9a74eb30b449 100644 --- a/Makefile +++ b/Makefile @@ -800,10 +800,10 @@ installdirs: # $(PLUGINS) is defined in plugins/Makefile. -install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) +install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $(PY_PLUGINS) $(PLUGIN_REQUIREMENTS_TXT) @$(NORMAL_INSTALL) $(INSTALL_PROGRAM) $(BIN_PROGRAMS) $(DESTDIR)$(bindir) - $(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(DESTDIR)$(pkglibexecdir) + $(INSTALL_PROGRAM) $(PKGLIBEXEC_PROGRAMS) $(PLUGIN_REQUIREMENTS_TXT) $(DESTDIR)$(pkglibexecdir) [ -z "$(PLUGINS)" ] || $(INSTALL_PROGRAM) $(PLUGINS) $(DESTDIR)$(plugindir) for PY in $(PY_PLUGINS); do DIR=`dirname $$PY`; DST=$(DESTDIR)$(plugindir)/`basename $$DIR`; if [ -d $$DST ]; then rm -rf $$DST; fi; $(INSTALL_PROGRAM) -d $$DIR; cp -a $$DIR $$DST ; done @@ -882,6 +882,10 @@ uninstall: $(ECHO) rm -f $(DESTDIR)$(docdir)/`basename $$f`; \ rm -f $(DESTDIR)$(docdir)/`basename $$f`; \ done + @for f in $(PLUGIN_REQUIREMENTS_TXT); do \ + $(ECHO) rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \ + rm -f $(DESTDIR)$(pkglibexecdir)/`basename $$f`; \ + done installcheck: all-programs @rm -rf testinstall || true diff --git a/plugins/.gitignore b/plugins/.gitignore index e38988d7d817..d139b1a20a05 100644 --- a/plugins/.gitignore +++ b/plugins/.gitignore @@ -19,3 +19,5 @@ recover cln-askrene recklessrpc exposesecret +clnrest-requirements.txt +wss-proxy-requirements.txt diff --git a/plugins/Makefile b/plugins/Makefile index 924c6ccb876b..972365e82fee 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -303,8 +303,21 @@ ifneq ($(RUST),0) DEFAULT_TARGETS += $(CLN_PLUGIN_EXAMPLES) plugins/cln-grpc endif +ifneq ($(NO_PYTHON), 1) +PLUGIN_REQUIREMENTS_TXT := plugins/wss-proxy-requirements.txt plugins/clnrest-requirements.txt +plugins/wss-proxy-requirements.txt: plugins/wss-proxy/pyproject.toml plugins/wss-proxy/poetry.lock + cd plugins/wss-proxy && poetry export --without-hashes > ../../$@ + + +plugins/clnrest-requirements.txt: plugins/clnrest/pyproject.toml plugins/clnrest/poetry.lock + cd plugins/clnrest && poetry export --without-hashes > ../../$@ + +all-programs: $(PLUGIN_REQUIREMENTS_TXT) +endif + clean: plugins-clean plugins-clean: + $(RM) $(PLUGIN_REQUIREMENTS_TXT) $(RM) $(PLUGINS) $(CLN_PLUGIN_EXAMPLES) $(RM) plugins/sql-schema_gen.h