##// END OF EJS Templates
profiling: add an assertion to help pytype...
profiling: add an assertion to help pytype Pytype 2023.11.21 with Python 3.10.11 (correctly) flagged `self._fp` as possibly not having a `getvalue()` method, likely since 6a8edf9f0a6d: File "/mnt/c/Users/Matt/hg/mercurial/profiling.py", line 344, in __exit__: No attribute 'getvalue' on BinaryIO [attribute-error] In Union[Any, BinaryIO, io.BytesIO] It appears this was flagged in CI too, but the test was marked as a success anyway, so it wasn't noticed. We'll fix that on stable and then merge on top of this.

File last commit:

r53167:6aa4ee2b stable
r53297:5ff6fba7 default
Show More
build-macos-wheels.sh
35 lines | 1.1 KiB | application/x-sh | BashLexer
#!/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