update setup.py usage and docs to meson

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2024-10-25 14:48:27 +02:00 committed by Pavel Hrdina
parent 31cb321909
commit cbd2a7ef92
3 changed files with 9 additions and 19 deletions

View File

@ -34,8 +34,7 @@ it by running the latest code using the steps above.
The following commands will be useful for anyone writing patches:
```sh
pytest # Run local unit test suite
./setup.py pylint # Run pylint/pycodestyle checking
meson test -C build
```
Any patches shouldn't change the output of 'pytest' or 'pylint'. Depending
@ -43,8 +42,9 @@ on what version of libvirt or pylint is installed, you may see some
pre-existing errors from these commands. The important thing is that
any changes you make do not add additional errors.
The 'pylint' command requires [`pylint`](https://github.com/PyCQA/pylint)
and [`pycodestyle`](https://github.com/pycqa/pycodestyle) to be installed.
The 'test' command requires [`pylint`](https://github.com/PyCQA/pylint),
[`pycodestyle`](https://github.com/pycqa/pycodestyle) and
['pytest'](https://github.com/pytest-dev/pytest/) to be installed.
If [`codespell`](https://github.com/codespell-project/codespell) is installed,
it will be invoked as well.

View File

@ -11,20 +11,10 @@ For more details on that, see [CONTRIBUTING.md](CONTRIBUTING.md)
To install the software into `/usr/local` (usually), you can do:
```sh
./setup.py install
meson setup build
meson install -C build
```
To build an RPM, you can run:
```sh
./setup.py rpm
```
`setup.py` generally has all the build and install commands, for more info see:
- `./setup.py --help-commands`
- `./setup.py install --help`
- [Python Standard Build and Install](https://docs.python.org/3/install/#standard-build-and-install)
## Pre-requisite software

View File

@ -34,14 +34,14 @@ def test_validate_po_files():
def test_validate_pot_strings():
"""
Validate that xgettext via `setup.py extract_messages` don't print
any warnings
Validate that xgettext via don't print any warnings.
"""
potfile = "po/virt-manager.pot"
origpot = open(potfile).read()
try:
subprocess.run(["meson", "setup", "build"], check=True)
out = subprocess.check_output(
["./setup.py", "extract_messages"],
["meson", "compile", "-C", "build", "virt-manager-pot"],
stderr=subprocess.STDOUT)
warnings = [l for l in out.decode("utf-8").splitlines()
if "warning:" in l]