]> git.proxmox.com Git - mirror_qemu.git/blame - python/Makefile
python: add Makefile for some common tasks
[mirror_qemu.git] / python / Makefile
CommitLineData
6560379f
JS
1.PHONY: help venv venv-check check clean distclean develop
2
3help:
4 @echo "python packaging help:"
5 @echo ""
6 @echo "make venv: Create pipenv's virtual environment."
7 @echo " NOTE: Requires Python 3.6 and pipenv."
8 @echo " Will download packages from PyPI."
9 @echo " Hint: (On Fedora): 'sudo dnf install python36 pipenv'"
10 @echo ""
11 @echo "make venv-check: run linters using pipenv's virtual environment."
12 @echo " Hint: If you don't know which test to run, run this one!"
13 @echo ""
14 @echo "make develop: Install deps for 'make check', and"
15 @echo " the qemu libs in editable/development mode."
16 @echo ""
17 @echo "make check: run linters using the current environment."
18 @echo ""
19 @echo "make clean: remove package build output."
20 @echo ""
21 @echo "make distclean: remove venv files, qemu package forwarder,"
22 @echo " built distribution files, and everything"
23 @echo " from 'make clean'."
24
25venv: .venv
26.venv: Pipfile.lock
27 @PIPENV_VENV_IN_PROJECT=1 pipenv sync --dev --keep-outdated
28 @touch .venv
29
30venv-check: venv
31 @pipenv run make check
32
33develop:
34 pip3 install -e .[devel]
35
36check:
37 @avocado --config avocado.cfg run tests/
38
39clean:
40 python3 setup.py clean --all
41
42distclean: clean
43 rm -rf qemu.egg-info/ .venv/ dist/