From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PULL 13/21] configure: rename --enable-pypi to --enable-download, control subprojects too
Date: Tue, 6 Jun 2023 16:31:08 +0200 [thread overview]
Message-ID: <20230606143116.685644-14-pbonzini@redhat.com> (raw)
In-Reply-To: <20230606143116.685644-1-pbonzini@redhat.com>
The behavior of --{enable,disable}-pypi is similar to that of
-Dwrapmode={default,nodownload} respectively. In particular,
in both cases a feature needs to be explicitly enabled for the
dependency to be downloaded.
So, use a single option to control both cases. Now, --enable-slirp
will trigger cloning and building of libslirp if the .pc file
is not found on the machine.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
.gitignore | 2 --
configure | 17 +++++++----------
meson.build | 12 ++++++++----
subprojects/.gitignore | 3 +++
4 files changed, 18 insertions(+), 16 deletions(-)
create mode 100644 subprojects/.gitignore
diff --git a/.gitignore b/.gitignore
index 1ea59f48192..61fa39967b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,5 +20,3 @@ GTAGS
*.swp
*.patch
*.gcov
-
-/subprojects/slirp
diff --git a/configure b/configure
index 92bacc756c0..52274212310 100755
--- a/configure
+++ b/configure
@@ -266,7 +266,7 @@ bsd_user=""
plugins="$default_feature"
ninja=""
python=
-pypi="enabled"
+download="enabled"
bindir="bin"
skip_meson=no
vfio_user_server="disabled"
@@ -754,9 +754,9 @@ for opt do
--with-git-submodules=*)
git_submodules_action="$optarg"
;;
- --disable-pypi) pypi="disabled"
+ --disable-download) download="disabled"
;;
- --enable-pypi) pypi="enabled"
+ --enable-download) download="enabled"
;;
--enable-plugins) if test "$mingw32" = "yes"; then
error_exit "TCG plugins not currently supported on Windows platforms"
@@ -960,7 +960,7 @@ python="$(command -v "$python")"
# - venv is allowed to use system packages;
# - all setup can be performed offline;
# - missing packages may be fetched from PyPI,
-# unless --disable-pypi is passed.
+# unless --disable-download is passed.
# - pip is not installed into the venv when possible,
# but ensurepip is called as a fallback when necessary.
@@ -977,7 +977,7 @@ python="$python -B"
mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
mkvenv_flags=""
-if test "$pypi" = "enabled" ; then
+if test "$download" = "enabled" ; then
mkvenv_flags="--online"
fi
@@ -1000,7 +1000,7 @@ meson="$(cd pyvenv/bin; pwd)/meson"
# Conditionally ensure Sphinx is installed.
mkvenv_flags=""
-if test "$pypi" = "enabled" -a "$docs" = "enabled" ; then
+if test "$download" = "enabled" -a "$docs" = "enabled" ; then
mkvenv_flags="--online"
fi
@@ -1940,11 +1940,8 @@ if test "$skip_meson" = no; then
rm -rf meson-private meson-info meson-logs
- # Prevent meson from automatically downloading wrapped subprojects when missing.
- # You can use 'meson subprojects download' before running configure.
- meson_option_add "--wrap-mode=nodownload"
-
# Built-in options
+ test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
test "$default_feature" = no && meson_option_add -Dauto_features=disabled
test "$static" = yes && meson_option_add -Dprefer_static=true
diff --git a/meson.build b/meson.build
index 4302c019237..f8af4b02e44 100644
--- a/meson.build
+++ b/meson.build
@@ -3985,8 +3985,15 @@ endif
# Configuration summary #
#########################
-# Directories
+# Build environment
summary_info = {}
+summary_info += {'Build directory': meson.current_build_dir()}
+summary_info += {'Source path': meson.current_source_dir()}
+summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
+summary_info += {'Download dependencies': get_option('wrap_mode') != 'nodownload'}
+summary(summary_info, bool_yn: true, section: 'Build environment')
+
+# Directories
summary_info += {'Install prefix': get_option('prefix')}
summary_info += {'BIOS directory': qemu_datadir}
pathsep = targetos == 'windows' ? ';' : ':'
@@ -4004,9 +4011,6 @@ else
summary_info += {'local state directory': 'queried at runtime'}
endif
summary_info += {'Doc directory': get_option('prefix') / get_option('docdir')}
-summary_info += {'Build directory': meson.current_build_dir()}
-summary_info += {'Source path': meson.current_source_dir()}
-summary_info += {'GIT submodules': config_host['GIT_SUBMODULES']}
summary(summary_info, bool_yn: true, section: 'Directories')
# Host binaries
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
new file mode 100644
index 00000000000..7560ebb0b1a
--- /dev/null
+++ b/subprojects/.gitignore
@@ -0,0 +1,3 @@
+/packagecache
+
+/slirp
--
2.40.1
next prev parent reply other threads:[~2023-06-06 14:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:30 [PULL 00/21] (Mostly) build system patches for 2023-06-06 Paolo Bonzini
2023-06-06 14:30 ` [PULL 01/21] meson: Avoid implicit declaration of absent functions Paolo Bonzini
2023-06-06 14:30 ` [PULL 02/21] atomics: eliminate mb_read/mb_set Paolo Bonzini
2023-06-06 14:30 ` [PULL 03/21] scripts: remove dead file Paolo Bonzini
2023-06-06 14:30 ` [PULL 04/21] meson.build: Group the UI entries in a separate summary section Paolo Bonzini
2023-06-06 14:31 ` [PULL 05/21] meson.build: Group the network backend " Paolo Bonzini
2023-06-06 14:31 ` [PULL 06/21] meson.build: Group the audio " Paolo Bonzini
2023-06-06 14:31 ` [PULL 07/21] meson.build: Use -Wno-undef only for SDL2 versions that need it Paolo Bonzini
2023-06-06 14:31 ` [PULL 08/21] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API Paolo Bonzini
2023-06-06 14:31 ` [PULL 09/21] Revert "tests/requirements.txt: bump up avocado-framework version to 101.0" Paolo Bonzini
2023-06-06 14:31 ` [PULL 10/21] tests: Use separate virtual environment for avocado Paolo Bonzini
2023-06-06 14:31 ` [PULL 11/21] mkvenv: always pass locally-installed packages to pip Paolo Bonzini
2023-06-06 14:31 ` [PULL 12/21] configure: remove --with-git= option Paolo Bonzini
2023-06-06 14:31 ` Paolo Bonzini [this message]
2023-06-06 14:31 ` [PULL 14/21] git-submodule: allow partial update of .git-submodule-status Paolo Bonzini
2023-07-20 15:08 ` Peter Maydell
2023-06-06 14:31 ` [PULL 15/21] build: log submodule update from git-submodule.sh Paolo Bonzini
2023-06-06 14:31 ` [PULL 16/21] meson: subprojects: replace submodules with wrap files Paolo Bonzini
2023-06-07 1:23 ` Richard Henderson
2023-06-06 14:31 ` [PULL 17/21] configure: move SLOF submodule handling to pc-bios/s390-ccw Paolo Bonzini
2023-06-06 14:31 ` [PULL 18/21] pc-bios/s390-ccw: always build network bootloader Paolo Bonzini
2023-06-06 14:31 ` [PULL 19/21] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
2023-06-06 14:31 ` [PULL 20/21] build: remove git submodule handling from main makefile Paolo Bonzini
2023-06-06 14:31 ` [PULL 21/21] configure: remove --with-git-submodules= Paolo Bonzini
2023-06-06 19:09 ` [PULL 00/21] (Mostly) build system patches for 2023-06-06 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230606143116.685644-14-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).