Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added type hints #2

Merged
merged 6 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,25 @@ function build_harfbuzz {
}

function install_rav1e {
if [[ -n "$IS_MACOS" ]] && [[ "$PLAT" == "arm64" ]]; then
librav1e_tgz=librav1e-${RAV1E_VERSION}-macos-aarch64.tar.gz
elif [ -n "$IS_MACOS" ]; then
librav1e_tgz=librav1e-${RAV1E_VERSION}-macos.tar.gz
elif [ "$PLAT" == "aarch64" ]; then
librav1e_tgz=librav1e-${RAV1E_VERSION}-linux-aarch64.tar.gz
if [ -n "$IS_MACOS" ]; then
suffix="macos"
if [[ "$PLAT" == "arm64" ]]; then
suffix+="-aarch64"
fi
else
librav1e_tgz=librav1e-${RAV1E_VERSION}-linux-generic.tar.gz
suffix="linux"
if [[ "$PLAT" == "aarch64" ]]; then
suffix+="-aarch64"
else
suffix+="-generic"
fi
fi

curl -sLo - \
https://github.com/xiph/rav1e/releases/download/v$RAV1E_VERSION/$librav1e_tgz \
https://github.com/xiph/rav1e/releases/download/v$RAV1E_VERSION/librav1e-$RAV1E_VERSION-$suffix.tar.gz \
| tar -C $BUILD_PREFIX --exclude LICENSE --exclude LICENSE --exclude '*.so' --exclude '*.dylib' -zxf -

if [ ! -n "$IS_MACOS" ]; then
if [ -z "$IS_MACOS" ]; then
sed -i 's/-lgcc_s/-lgcc_eh/g' "${BUILD_PREFIX}/lib/pkgconfig/rav1e.pc"
fi

Expand All @@ -101,7 +105,7 @@ function build_libavif {
python -m pip install meson ninja

if [[ "$PLAT" == "x86_64" ]]; then
build_simple nasm 2.15.05 https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/
build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/
fi

local cmake=$(get_modern_cmake)
Expand Down Expand Up @@ -210,7 +214,7 @@ if [[ -n "$IS_MACOS" ]]; then
brew remove --ignore-dependencies webp aom libavif
fi

brew install meson pkg-config
brew install pkg-config

# clear bash path cache for curl
hash -d curl
Expand Down
4 changes: 2 additions & 2 deletions Tests/check_avif_leaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]


def test_leak_load():
def test_leak_load() -> None:
from resource import RLIMIT_AS, RLIMIT_STACK, setrlimit

setrlimit(RLIMIT_STACK, (stack_size, stack_size))
Expand All @@ -30,7 +30,7 @@ def test_leak_load():
im.load()


def test_leak_save():
def test_leak_save() -> None:
from resource import RLIMIT_AS, RLIMIT_STACK, setrlimit

setrlimit(RLIMIT_STACK, (stack_size, stack_size))
Expand Down
Loading
Loading