Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (48 loc) · 1.56 KB
/
Copy pathMakefile
File metadata and controls
58 lines (48 loc) · 1.56 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: test
test: ## Run tests
@pytest tests \
--durations 10
.PHONY: lint
lint: ## Run ruff formatter and linter
@ruff format
@ruff check --fix
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-build: ## remove build artifacts
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc: ## remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
rm -fr .pytest_cache
dist: clean ## builds source and wheel package
python3 -m build
ls -l dist
.PHONY: dist-wheel
dist-wheel: clean ## builds native abi3 wheel using cibuildwheel
pip install cibuildwheel==2.23.4
python -m cibuildwheel --output-dir dist
ls -l dist
.PHONY: dist-pyodide
dist-pyodide: clean ## builds Pyodide/emscripten wheel (requires Linux or macOS)
pip install cibuildwheel==4.2.1
python -m cibuildwheel --platform pyodide --output-dir dist
ls -l dist
.PHONY: dist-sdist
dist-sdist: clean ## builds source distribution only
pip install build
python3 -m build --sdist
ls -l dist
.PHONY: dist-all
dist-all: clean ## builds native wheel, Pyodide wheel, and sdist
pip install cibuildwheel==2.23.4 build
python -m cibuildwheel --output-dir dist
pip install cibuildwheel==4.2.1
python -m cibuildwheel --platform pyodide --output-dir dist
python3 -m build --sdist --outdir dist
ls -l dist