view contrib/packaging/build-macos-wheels.sh @ 52316:a820a7a1fce0 default tip

setup: require TLS 1.2 support from the Python interpreter (BC) Before it was optional, and either 1.1 or 1.2 was sufficient. Now that the default minimum is 1.2, it needs to be present to work out of the box. The code here is more convoluted than the corresponding checks in `sslutil.py`, but I'm leaving it alone because it can all be simplified when py38 is dropped.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 21 Nov 2024 11:46:10 -0500
parents 6aa4ee2bb128
children
line wrap: on
line source

#!/bin/sh

# This is a convenience script to build all of the wheels outside of the CI
# system.  It requires the cibuildwheel package to be installed, and the
# executable on PATH, as well as `msgfmt` from gettext, which can be installed
# with `brew` as follows:
#
#   $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#   $ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
#   <logout>
#   $ brew install gettext
#
# A system-wide installation of the version of python corresponding to each
# wheel is required.  They can be installed by this script by setting `CI=true`
# in the environment before running it, and providing the `sudo` password when 
# prompted.

set -e

# Build translations; requires msgfmt on PATH.
export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1

if ! which msgfmt 2>/dev/null 1>/dev/null; then
    echo "msgfmt executable not found" >&2
    exit 1
fi

# Prevent building pypy wheels, which is broken.
export CIBW_SKIP=pp*

export CIBW_ARCHS=universal2

# TODO: purge the repo?

cibuildwheel --output-dir dist/wheels