-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·51 lines (40 loc) · 1.39 KB
/
Copy pathMakefile
File metadata and controls
executable file
·51 lines (40 loc) · 1.39 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
.PHONY: clean clean-test clean-pyc clean-build docs help
.DEFAULT_GOAL := help
help: Makefile
@sed -n 's/^\([A-Za-z0-9_.-]*\):.*## \(.*\)$$/\t\1: \2/p' Makefile | sort | column -t -s ':'
build: clean ## Build the c libraries
python setup.py build_ext --inplace
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
clean-c: ## Clean compiled C code
find . -name '*.so' -exec rm -f {} +
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 .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
tests: ## Run the Python tests
python setup.py test
coverage: ## Check Python code coverage
coverage run --source pysnobal setup.py test
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
docs: ## Generate Sphinx HTML documentation, including API docs
rm -f docs/pysnobal.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ pysnobal
$(MAKE) -C docs clean
$(MAKE) -C docs html
install: clean ## Install the Python package in editable mode
python -m pip install -e .