-run_command(python3, '-c', 'import shutil; shutil.copy("scripts/git-hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")')
-
-# Ensure that the user does not have Strawberry Perl in PATH, since it ships
-# with a pkg-config.bat and broken pkgconfig files for libffi and zlib. Will
-# cause a build error, such as in
-# https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/41
-ensure_no_strawberry_perl = '''
-import os
-assert(r'Strawberry\perl\bin' not in os.environ['PATH'])
-'''
-if build_system == 'windows'
- cmdres = run_command(python3, '-c', ensure_no_strawberry_perl)
- if cmdres.returncode() != 0
- error('You have Strawberry Perl in PATH which is known to cause build issues with gst-build. Please remove it from PATH or uninstall it.')
+run_command(python3, '-c', 'import shutil; shutil.copy("scripts/git-hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")', check: false)
+
+# 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))