summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-07-02 05:33:40 +0530
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2022-07-18 06:25:36 +0000
commit7a163dae4da86c57371b9037ce748b82931ba44f (patch)
treeb6d203d756bae9719712911f7eaff8c6d80fbc31 /meson.build
parent35994eb5c92f6da3713576a346b0dc5a05766bd1 (diff)
downloadgstreamer-7a163dae4da86c57371b9037ce748b82931ba44f.tar.gz
meson: Improve certifi documentation on macOS
First, just installing certifi doesn't install the ca-cert in the right location. The `Install Certificates.command` script also symlinks the openssl cert.pem to the certifi ca cert file Second, we can make it more likely that users will notice this if we make it a warning. If we ever get a bug report about this despite these measures, we can try to make this an error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2707>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 619341adb8..3967832f92 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,20 @@ if build_system == 'windows' and meson.version().version_compare('<0.60.0')
endif
endif
+# On macOS, you have to run "Install Certificates.command" otherwise Python
+# doesn't have access to the latest SSL CA Certificates, and Meson will fail to
+# download wrap files from websites that use, for example, Let's Encrypt.
+# We already recommend this in the README, but add a warning here as well.
+# Can't make this an error because the user might be using XCode's Python
+# 3 which doesn't have this script.
+if build_system == 'darwin'
+ python3_cacert_file = python3.get_path('data') / 'etc/openssl/cert.pem'
+ install_cert_cmd = '/Applications/Python @0@/Install Certificates.command'.format(python3.language_version())
+ if not fs.is_symlink(python3_cacert_file) and fs.is_file(install_cert_cmd)
+ warning('Please run "@0@" so that Python has access to the latest SSL certificates. Meson might fail to download some wraps without it.'.format(install_cert_cmd))
+ endif
+endif
+
documented_projects = ''
# Make it possible to use msys2 built zlib which fails
# when not using the mingw toolchain as it uses unistd.h