-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 1.2 KB
/
Makefile
File metadata and controls
36 lines (28 loc) · 1.2 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
PYTHON ?= python3
# A ZIP served over HTTPS with Range support (a PyPI wheel is a ZIP). Larger than
# the ~64KB ZIP index window, so the bandwidth savings are clearly visible.
EXAMPLE_URL ?= https://files.pythonhosted.org/packages/5d/95/6b5cb3461ea5673ba0995989746db58eb18b91b54dbf331e72f569540946/pip-26.1.2-py3-none-any.whl
EXAMPLE_FILE ?= pip/__init__.py
.PHONY: help install test build example example-list clean
help:
@echo "Targets:"
@echo " install Editable install with test extras"
@echo " test Run the pytest suite"
@echo " build Build the sdist + wheel into dist/"
@echo " example-list Run the example CLI: list entries of EXAMPLE_URL"
@echo " example Run the example CLI: extract EXAMPLE_FILE from EXAMPLE_URL"
@echo " clean Remove build/test artifacts"
install:
$(PYTHON) -m pip install -e ".[test]"
test:
$(PYTHON) -m pytest -q
build:
$(PYTHON) -m pip install --quiet --upgrade build
$(PYTHON) -m build
example-list:
$(PYTHON) -m pinch_example "$(EXAMPLE_URL)"
example:
$(PYTHON) -m pinch_example "$(EXAMPLE_URL)" "$(EXAMPLE_FILE)"
clean:
rm -rf build dist .pytest_cache src/*.egg-info
find . -type d -name __pycache__ -prune -exec rm -rf {} +