qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/10] configure: create a python venv and install meson
@ 2023-04-14  5:54 John Snow
  2023-04-14  5:54 ` [RFC PATCH v2 01/10] python: add mkvenv.py John Snow
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: John Snow @ 2023-04-14  5:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cleber Rosa, Ani Sinha, Warner Losh, Alex Bennée,
	Reinoud Zandijk, Thomas Huth, Paolo Bonzini, John Snow,
	Ryo ONODERA, Kyle Evans, Beraldo Leal, Michael S. Tsirkin,
	Wainer dos Santos Moschetta, Philippe Mathieu-Daudé

GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/836855908
           (All green. phew.)

(This is a quick V2 RFC to freshen the patches on the list and
consolidate some fixes made so far. See changes below.)

This patch series creates a mandatory venv during configure time and
uses it to install meson.

The eventual goal of all of this is to ensure that the Python used to
run meson is the same Python used to run Sphinx, tests, and any
build-time scripting we have. As it stands, meson and sphinx (and their
extensions) may run in a different Python environment than the one
configured and chosen by the user at configure/build time.

We can ensure that everything uses the same Python and has the same
packages available with a bit of up-front work. See
https://www.qemu.org/2023/03/24/python/ for more information.

Changes in V2:

- Each workaround in mkvenv is added in a separate patch now to better
  isolate parts of the design and what they were added to address.
- Introduction into configure is split into two parts, the first of
  which is quite a bit cleaner and introduces a lot less logic into the
  configure file.
- Avocado tests now use the configure-time venv.
- Python 3.7 now works unconditionally without new dependencies, though
  we might drop it in favor of 3.8 soon. "Just in case", I suppose.
- msys2 CI jobs now pass - there was a bug in the os.chmod call under
  windows.
- NetBSD now works; mkvenv.py has better diagnostics for detecting
  NetBSD edge cases.

Changes yet to come for further revisions to this series:

- Need to add Sphinx support.
- Need to add nested venv support.
- PyPI support? (To drop meson git submodule?)
- Installing meson from vendored .whl files for tarballs?
  (To drop --no-use-pep517 hack?)

John Snow (10):
  python: add mkvenv.py
  tests: add python3-venv dependency
  mkvenv: Add better error message for missing pyexapt module
  tests/vm: Configure netbsd to use Python 3.10
  tests/vm: add py310-expat to NetBSD
  mkvenv: generate console entry shims from inside the venv
  mkvenv: work around broken pip installations on Debian 10
  configure: create a python venv unconditionally
  configure: remove --meson=; install meson to the pyvenv
  tests: Use configure-provided pyvenv for tests

 docs/devel/acpi-bits.rst                      |   6 +-
 docs/devel/testing.rst                        |  14 +-
 configure                                     | 138 ++++--
 .gitlab-ci.d/buildtest-template.yml           |   4 +-
 .gitlab-ci.d/buildtest.yml                    |   6 +-
 python/scripts/mkvenv.py                      | 466 ++++++++++++++++++
 .../org.centos/stream/8/x86_64/test-avocado   |   4 +-
 scripts/device-crash-test                     |   2 +-
 tests/Makefile.include                        |  10 +-
 .../dockerfiles/debian-all-test-cross.docker  |   3 +-
 .../dockerfiles/debian-hexagon-cross.docker   |   3 +-
 .../dockerfiles/debian-riscv64-cross.docker   |   3 +-
 .../dockerfiles/debian-tricore-cross.docker   |   3 +-
 tests/requirements.txt                        |   7 +-
 tests/vm/netbsd                               |   2 +
 15 files changed, 590 insertions(+), 81 deletions(-)
 create mode 100644 python/scripts/mkvenv.py

-- 
2.39.2




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-04-14 14:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14  5:54 [RFC PATCH v2 00/10] configure: create a python venv and install meson John Snow
2023-04-14  5:54 ` [RFC PATCH v2 01/10] python: add mkvenv.py John Snow
2023-04-14  5:54 ` [RFC PATCH v2 02/10] tests: add python3-venv dependency John Snow
2023-04-14 14:17   ` Philippe Mathieu-Daudé
2023-04-14  5:54 ` [RFC PATCH v2 03/10] mkvenv: Add better error message for missing pyexapt module John Snow
2023-04-14  5:54 ` [RFC PATCH v2 04/10] tests/vm: Configure netbsd to use Python 3.10 John Snow
2023-04-14  5:54 ` [RFC PATCH v2 05/10] tests/vm: add py310-expat to NetBSD John Snow
2023-04-14  5:54 ` [RFC PATCH v2 06/10] mkvenv: generate console entry shims from inside the venv John Snow
2023-04-14  5:54 ` [RFC PATCH v2 07/10] mkvenv: work around broken pip installations on Debian 10 John Snow
2023-04-14  5:54 ` [RFC PATCH v2 08/10] configure: create a python venv unconditionally John Snow
2023-04-14  5:54 ` [RFC PATCH v2 09/10] configure: remove --meson=; install meson to the pyvenv John Snow
2023-04-14  5:54 ` [RFC PATCH v2 10/10] tests: Use configure-provided pyvenv for tests John Snow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).