-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (49 loc) · 1.56 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SHELL=/bin/bash -euo pipefail
.DEFAULT_GOAL := help
WHEEL_DIR ?= wheel_dist
PYTHON_VERSION?=3.13
COMPOSE=docker compose
clean: ## cleans the build artifacts
rm -Rf build/ dist/ *.egg-info $(WHEEL_DIR)
.PHONY: clean
install: ## install dependencies
pip install .
.PHONY: install
test: install
python -m unittest discover -vf
.PHONY: test
update-version:
./scripts/update-version.sh
.PHONY: update-version
wheel:
pip wheel --verbose --no-deps --wheel-dir=$(WHEEL_DIR) .
.PHONY: wheel
wheel-check:
twine check $(WHEEL_DIR)/*
.PHONY: wheel-check
print-version: ## prints the current python conprof version
@python -c "exec(open('blackfire_conprof/version.py').read()); print(__version__)"
.PHONY: print-version
doc-lint: ## Verify markdown rules
docker run --rm -v ${PWD}:/data mivok/markdownlint src
.PHONY: doc-lint
build: build-docker clean ## build the python-conprof using a dockerized python runtime
PYTHON_VERSION=$(PYTHON_VERSION) $(COMPOSE) run --rm python make update-version wheel wheel-check
build-docker:
PYTHON_VERSION=$(PYTHON_VERSION) $(COMPOSE) build python
.PHONY: build-docker
release: ## release the python conprof
ifdef CI
buildkite-agent artifact download '$(WHEEL_DIR)/*' .
endif
./scripts/release.sh $(WHEEL_DIR)
.PHONY: release
print_wheel:
@echo $(WHEEL_DIR)
.PHONY: print_wheel
##
### Misc
##
help: ## Displays help for Makefile commands
@grep -hE '(^[a-zA-Z_-]+:.*?##.*$$)|(^###)' $(MAKEFILE_LIST) | grep -vhE '(^###[<>])' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m\n/'
.PHONY: help