projects.py: Move bulk of code into module

Move nearly all of projects.py into src/python/jw/build/App.py. The
plan is to split the script into parts and import them.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-15 11:08:52 +01:00
commit aa3e2efd84
10 changed files with 1033 additions and 1012 deletions

View file

@ -131,7 +131,7 @@ EDITOR ?= xdg-open
ifeq ($(TIME),)
TIME = $(shell which time) -p
endif
PROJECTS_PY = python3 $(JWB_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS)
PROJECTS_PY = PYTHONPATH=$(realpath $(JWBDIR)/src/python) $(TIME) python3 $(JWB_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS)
PROJECTS_PY_BUILD = $(PROJECTS_PY) build $(PROJECTS_PY_EXTRA_BUILD_OPTS)
PGIT_SH = /bin/bash $(JWB_SCRIPT_DIR)/pgit.sh
PURGE_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/purge-stale-projects.sh $(JW_BUILD_BINDIR)/purge-stale-projects.sh) purge-not-found)
@ -154,7 +154,7 @@ CVS_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /CVS
# --- mandatory targets
all: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(TIME) $(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
$(PROJECTS_PY_BUILD) $@ $(TARGET_PROJECTS)
clean: clean-dirs
distclean: clean-all-dirs done.clean
install: