forked from phorward/pyodide
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (24 loc) · 1.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export PYODIDE_ROOT=$(abspath ..)
PYODIDE_LIBRARIES=$(abspath ./.artifacts)
CPYTHONROOT=$(PYODIDE_ROOT)/cpython
include ../Makefile.envs
export NUMPY_LIB=$(PYODIDE_ROOT)/packages/numpy/build/numpy-1.17.5/install/lib/python$(PYMAJOR).$(PYMINOR)/site-packages/numpy/core/lib/
ifeq ($(strip $(PYODIDE_PACKAGES)),)
else
ONLY_PACKAGES=--only "$(PYODIDE_PACKAGES)"
endif
all: .artifacts/bin/pyodide-build
mkdir -p build-logs
PYTHONPATH="$(PYODIDE_LIBRARIES)/lib/python:$(PYODIDE_ROOT)/pyodide-build/" pyodide-build buildall . ../build \
--target=$(TARGETPYTHONROOT) $(ONLY_PACKAGES) --install-dir $(PYODIDE_LIBRARIES) --n-jobs $${PYODIDE_JOBS:-4} \
--log-dir=build-logs
.artifacts/bin/pyodide-build: ../pyodide-build/pyodide_build/**
mkdir -p $(PYODIDE_LIBRARIES)
python3 -m pip install -e ../pyodide-build --no-deps --prefix $(PYODIDE_LIBRARIES)
update-all:
for pkg in $$(find . -maxdepth 1 ! -name ".*" -type d -exec basename {} \; | tail -n +2); do \
pyodide-build mkpkg "$${pkg}" --update; \
done
clean:
rm -rf ./*/build ./*/build.log
rm -rf ./.artifacts