2021-01-03 21:09:40 +00:00
|
|
|
export PYODIDE_ROOT=$(abspath ..)
|
2020-12-07 23:19:16 +00:00
|
|
|
PYODIDE_LIBRARIES=$(abspath ./.artifacts)
|
2018-06-20 18:54:47 +00:00
|
|
|
include ../Makefile.envs
|
|
|
|
|
2021-03-20 18:00:35 +00:00
|
|
|
ifeq ($(strip $(PYODIDE_PACKAGES)),)
|
|
|
|
else
|
|
|
|
ONLY_PACKAGES=--only "$(PYODIDE_PACKAGES)"
|
|
|
|
endif
|
|
|
|
|
2021-05-22 22:19:46 +00:00
|
|
|
all: .artifacts/bin/pyodide-build
|
2021-05-03 18:51:11 +00:00
|
|
|
PYTHONPATH="$(PYODIDE_LIBRARIES)/lib/python:$(PYODIDE_ROOT)/pyodide-build/" pyodide-build buildall . ../build \
|
2021-04-20 20:57:13 +00:00
|
|
|
--target=$(TARGETPYTHONROOT) $(ONLY_PACKAGES) --install-dir $(PYODIDE_LIBRARIES) --n-jobs $${PYODIDE_JOBS:-4}
|
2021-03-20 18:00:35 +00:00
|
|
|
|
2021-05-22 22:19:46 +00:00
|
|
|
.artifacts/bin/pyodide-build: ../pyodide-build/pyodide_build/**
|
|
|
|
mkdir -p $(PYODIDE_LIBRARIES)
|
|
|
|
python3 -m pip install -e ../pyodide-build --no-deps --prefix $(PYODIDE_LIBRARIES)
|
2020-07-13 21:34:10 +00:00
|
|
|
|
|
|
|
update-all:
|
|
|
|
for pkg in $$(find . -maxdepth 1 -type d -exec basename {} \; | tail -n +2); do \
|
2021-05-03 18:51:11 +00:00
|
|
|
pyodide-build mkpkg "$${pkg}" --update; \
|
2020-07-13 21:34:10 +00:00
|
|
|
done
|
|
|
|
|
2018-06-20 18:54:47 +00:00
|
|
|
clean:
|
2020-12-10 19:37:08 +00:00
|
|
|
rm -rf ./*/build ./*/build.log
|
2020-12-07 23:19:16 +00:00
|
|
|
rm -rf ./.artifacts
|