File: Makefile

package info (click to toggle)
python-hvac 2.3.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,800 kB
  • sloc: python: 29,360; makefile: 42; sh: 14
file content (38 lines) | stat: -rw-r--r-- 1,000 bytes parent folder | download | duplicates (2)
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
PYTHON_IMAGE		?= wpengine/python
REQUIREMENTS_FILES	:= requirements requirements-dev

.PHONY: clean package publish test update-all-requirements typos $(addsuffix .txt, $(REQUIREMENTS_FILES)) docs/requirements.txt

test:
	pytest --cov=hvac tests/

clean:
	rm -rf dist hvac.egg-info

distclean: clean
	rm -rf build

package:
	python setup.py sdist bdist_wheel

typos:
	typos --format brief

# Note, we breakout the docs/requirements target separately since its not reasonable to use filesystem paths in target names
update-all-requirements: $(addprefix update-, $(REQUIREMENTS_FILES)) update-docs-requirements
update-docs-requirements:
	$(call pip-compile,docs/requirements)
update-%:
	$(call pip-compile,$(*))

define pip-compile
	@echo
	# Running pip-compile to update $(1).txt (using $(1).in)...
	@docker run \
		--rm \
		--volume $(PWD):/workspace \
		${PYTHON_IMAGE} \
			pip-compile --upgrade --output-file $(1).txt $(1).in
	@echo
	# Successfully compiled python $(1).txt (using $(1).in).
endef