-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (29 loc) · 858 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
PYTHON=python3
PACKAGE=pycwp
CYTOOLS= $(PACKAGE)/cytools
CYTHON_SRC= $(CYTOOLS)/boxer.c $(CYTOOLS)/eikonal.c \
$(CYTOOLS)/interpolator.c $(CYTOOLS)/ptutils.c \
$(CYTOOLS)/quadrature.c $(CYTOOLS)/regularize.c \
$(CYTOOLS)/stats.c
CYTHON_OPTS= -X language_level=2 -X embedsignature=True
default: install
install: wheel
mkdir -p build
TMPDIR=build $(PYTHON) -m pip install \
--no-deps --no-clean --no-build-isolation \
--force-reinstall dist/$(PACKAGE)-*-*-*-*.whl
wheel:
$(PYTHON) -m build --no-isolation --wheel .
sdist:
$(PYTHON) -m build --no-isolation --sdist .
clean:
rm -rf build dist
rm -rf $(PACKAGE).egg-info
rm -f $(CYTHON_SRC) $(CYTHON_SRC:.c=.html)
cythonize: $(CYTHON_SRC)
cyhtml: $(CYTHON_SRC:.c=.html)
.SUFFIXES: .html .pyx .c
.pyx.html:
cythonize $(CYTHON_OPTS) -a $<
.pyx.c:
cythonize $(CYTHON_OPTS) $<