target/ppc: raise HV interrupts for partition table entry problems
[qemu/rayw.git] / python / Makefile
blob949c472624a38c3ebf1ededed094a544c2227ddf
1 QEMU_VENV_DIR=.dev-venv
2 QEMU_TOX_EXTRA_ARGS ?=
4 .PHONY: help
5 help:
6 @echo "python packaging help:"
7 @echo ""
8 @echo "make check-pipenv:"
9 @echo " Run tests in pipenv's virtual environment."
10 @echo " These tests use the oldest dependencies."
11 @echo " Requires: Python 3.6 and pipenv."
12 @echo " Hint (Fedora): 'sudo dnf install python3.6 pipenv'"
13 @echo ""
14 @echo "make check-tox:"
15 @echo " Run tests against multiple python versions."
16 @echo " These tests use the newest dependencies."
17 @echo " Requires: Python 3.6 - 3.10, and tox."
18 @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.10'"
19 @echo " The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra"
20 @echo " arguments to tox".
21 @echo ""
22 @echo "make check-dev:"
23 @echo " Run tests in a venv against your default python3 version."
24 @echo " These tests use the newest dependencies."
25 @echo " Requires: Python 3.x"
26 @echo ""
27 @echo "make check:"
28 @echo " Run tests in your *current environment*."
29 @echo " Performs no environment setup of any kind."
30 @echo ""
31 @echo "make develop:"
32 @echo " Install deps needed for for 'make check',"
33 @echo " and install the qemu package in editable mode."
34 @echo " (Can be used in or outside of a venv.)"
35 @echo ""
36 @echo "make pipenv"
37 @echo " Creates pipenv's virtual environment (.venv)"
38 @echo ""
39 @echo "make dev-venv"
40 @echo " Creates a simple venv for check-dev. ($(QEMU_VENV_DIR))"
41 @echo ""
42 @echo "make clean:"
43 @echo " Remove package build output."
44 @echo ""
45 @echo "make distclean:"
46 @echo " remove pipenv/venv files, qemu package forwarder,"
47 @echo " built distribution files, and everything from 'make clean'."
48 @echo ""
49 @echo -e "Have a nice day ^_^\n"
51 .PHONY: pipenv
52 pipenv: .venv
53 .venv: Pipfile.lock
54 @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated
55 rm -f pyproject.toml
56 @touch .venv
58 .PHONY: check-pipenv
59 check-pipenv: pipenv
60 @pipenv run make check
62 .PHONY: dev-venv
63 dev-venv: $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate
64 $(QEMU_VENV_DIR) $(QEMU_VENV_DIR)/bin/activate: setup.cfg
65 @echo "VENV $(QEMU_VENV_DIR)"
66 @python3 -m venv $(QEMU_VENV_DIR)
67 @( \
68 echo "ACTIVATE $(QEMU_VENV_DIR)"; \
69 . $(QEMU_VENV_DIR)/bin/activate; \
70 echo "INSTALL qemu[devel] $(QEMU_VENV_DIR)"; \
71 pip install --disable-pip-version-check \
72 "setuptools<60.0.0" 1>/dev/null; \
73 make develop 1>/dev/null; \
75 @touch $(QEMU_VENV_DIR)
77 .PHONY: check-dev
78 check-dev: dev-venv
79 @( \
80 echo "ACTIVATE $(QEMU_VENV_DIR)"; \
81 . $(QEMU_VENV_DIR)/bin/activate; \
82 make check; \
85 .PHONY: develop
86 develop:
87 pip3 install --disable-pip-version-check -e .[devel]
89 .PHONY: check
90 check:
91 @avocado --config avocado.cfg run tests/
93 .PHONY: check-tox
94 check-tox:
95 @tox $(QEMU_TOX_EXTRA_ARGS)
97 .PHONY: check-coverage
98 check-coverage:
99 @coverage run -m avocado --config avocado.cfg run tests/*.py
100 @coverage combine
101 @coverage html
102 @coverage report
104 .PHONY: clean
105 clean:
106 python3 setup.py clean --all
107 rm -f pyproject.toml
109 .PHONY: distclean
110 distclean: clean
111 rm -rf qemu.egg-info/ .venv/ .tox/ $(QEMU_VENV_DIR) dist/
112 rm -f .coverage .coverage.*
113 rm -rf htmlcov/