|
1 | 1 | # simple makefile to simplify repetitive build env management tasks under posix
|
2 | 2 |
|
3 |
| -# caution: testing won't work on windows, see README |
4 |
| - |
5 | 3 | PYTHON ?= python
|
6 |
| -CYTHON ?= cython |
7 |
| -PYTEST ?= pytest |
8 | 4 |
|
9 |
| -# skip doctests on 32bit python |
10 |
| -BITS := $(shell python -c 'import struct; print(8 * struct.calcsize("P"))') |
| 5 | +all: |
| 6 | + @echo "Please use 'make <target>' where <target> is one of" |
| 7 | + @echo " dev build scikit-learn with Meson" |
| 8 | + @echo " clean clean scikit-learn Meson build. Very rarely needed," |
| 9 | + @echo " one use case is when switching back to setuptools" |
| 10 | + @echo " dev-setuptools build scikit-learn with setuptools (deprecated)" |
| 11 | + @echo " clean-setuptools clean scikit-learn setuptools build (deprecated)" |
11 | 12 |
|
12 |
| -all: clean inplace test |
| 13 | +.PHONY: all |
13 | 14 |
|
14 |
| -clean: |
15 |
| - $(PYTHON) setup.py clean |
16 |
| - rm -rf dist |
17 |
| - |
18 |
| -in: inplace # just a shortcut |
19 |
| -inplace: |
20 |
| - $(PYTHON) setup.py build_ext -i |
| 15 | +dev: dev-meson |
21 | 16 |
|
22 | 17 | dev-meson:
|
23 | 18 | pip install --verbose --no-build-isolation --editable . --check-build-dependencies --config-settings editable-verbose=true
|
24 | 19 |
|
| 20 | +clean: clean-meson |
| 21 | + |
25 | 22 | clean-meson:
|
26 | 23 | pip uninstall -y scikit-learn
|
27 | 24 |
|
28 |
| -test-code: in |
29 |
| - $(PYTEST) --showlocals -v sklearn --durations=20 |
30 |
| -test-sphinxext: |
31 |
| - $(PYTEST) --showlocals -v doc/sphinxext/ |
32 |
| -test-doc: |
33 |
| -ifeq ($(BITS),64) |
34 |
| - $(PYTEST) $(shell find doc -name '*.rst' | sort) |
35 |
| -endif |
36 |
| -test-code-parallel: in |
37 |
| - $(PYTEST) -n auto --showlocals -v sklearn --durations=20 |
38 |
| - |
39 |
| -test-coverage: |
40 |
| - rm -rf coverage .coverage |
41 |
| - $(PYTEST) sklearn --showlocals -v --cov=sklearn --cov-report=html:coverage |
42 |
| -test-coverage-parallel: |
43 |
| - rm -rf coverage .coverage .coverage.* |
44 |
| - $(PYTEST) sklearn -n auto --showlocals -v --cov=sklearn --cov-report=html:coverage |
45 |
| - |
46 |
| -test: test-code test-sphinxext test-doc |
47 |
| - |
48 |
| -cython: |
49 |
| - python setup.py build_src |
50 |
| - |
51 |
| -doc: inplace |
52 |
| - $(MAKE) -C doc html |
53 |
| - |
54 |
| -doc-noplot: inplace |
55 |
| - $(MAKE) -C doc html-noplot |
| 25 | +dev-setuptools: |
| 26 | + $(PYTHON) setup.py build_ext -i |
| 27 | + |
| 28 | +clean-setuptools: |
| 29 | + $(PYTHON) setup.py clean |
| 30 | + rm -rf dist |
0 commit comments