summaryrefslogtreecommitdiff
path: root/contrib/python/pypodman/Makefile
blob: 230eee44d293b6766657c10b9bde99542e8c148e (plain)
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
PYTHON ?= $(shell command -v python3 2>/dev/null || command -v python)
DESTDIR := /
PODMAN_VERSION ?= '0.11.1.1'

.PHONY: python-pypodman
python-pypodman:
	PODMAN_VERSION=$(PODMAN_VERSION) \
	$(PYTHON) setup.py sdist bdist

.PHONY: lint
lint:
	$(PYTHON) -m pylint pypodman

.PHONY: integration
integration:
	true

.PHONY: install
install:
	PODMAN_VERSION=$(PODMAN_VERSION) \
	$(PYTHON) setup.py install --root ${DESTDIR}

.PHONY: upload
upload:
	PODMAN_VERSION=$(PODMAN_VERSION) $(PYTHON) setup.py sdist bdist_wheel
	twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: clobber
clobber: uninstall clean

.PHONY: uninstall
	$(PYTHON) -m pip uninstall --yes pypodman ||:

.PHONY: clean
clean:
	rm -rf pypodman.egg-info dist
	find . -depth -name __pycache__ -exec rm -rf {} \;
	find . -depth -name \*.pyc -exec rm -f {} \;
	$(PYTHON) ./setup.py clean --all