forked from pocketpy/xtensor-numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (30 loc) · 929 Bytes
/
Makefile
File metadata and controls
36 lines (30 loc) · 929 Bytes
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
32
33
34
35
36
PROJECT_SOURCE_DIR ?= $(abspath ./)
PROJECT_NAME ?= $(shell basename $(PROJECT_SOURCE_DIR))
NUM_JOB ?= 8
all:
@echo nothing special
.PHONY: all
clean:
rm -rf build dist
.PHONY: clean
PYTHON ?= python3
build:
$(PYTHON) -m pip install scikit_build_core pyproject_metadata pathspec 'pybind11>=2.12,<3'
CMAKE_BUILD_PARALLEL_LEVEL=$(NUM_JOB) $(PYTHON) -m pip install --no-build-isolation -Ceditable.rebuild=true -Cbuild-dir=build -ve.
python_install:
$(PYTHON) -m pip install . --verbose
python_wheel:
$(PYTHON) -m pip wheel . -w build --verbose
python_sdist:
$(PYTHON) -m build --sdist
test_install:
python3 -m pip install dist/pocket_numpy-*.tar.gz --force-reinstall
.PHONY: build python_install python_wheel python_sdist test_install
test:
build/pocketpy.exe tests/test_numpy.py
build_wasm:
bash build_wasm.sh
.PHONY: build_wasm
serve_wasm:
cd docs && python3 -m http.server 8080 --bind 0.0.0.0
.PHONY: serve_wasm