mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge branch 'main' into resize_i16
This commit is contained in:
commit
42ad42c174
2
.github/workflows/cifuzz.yml
vendored
2
.github/workflows/cifuzz.yml
vendored
|
@ -24,8 +24,6 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
Fuzzing:
|
||||
# Disabled until google/oss-fuzz#11419 upgrades Python to 3.9+
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build Fuzzers
|
||||
|
|
36
.github/workflows/wheels-dependencies.sh
vendored
36
.github/workflows/wheels-dependencies.sh
vendored
|
@ -16,11 +16,7 @@ ARCHIVE_SDIR=pillow-depends-main
|
|||
|
||||
# Package versions for fresh source builds
|
||||
FREETYPE_VERSION=2.13.2
|
||||
if [[ -n "$IS_MACOS" ]] || ([[ "$MB_ML_VER" != 2014 ]] && [[ -z "$SANITIZER" ]]); then
|
||||
HARFBUZZ_VERSION=10.0.1
|
||||
else
|
||||
HARFBUZZ_VERSION=8.5.0
|
||||
fi
|
||||
HARFBUZZ_VERSION=10.0.1
|
||||
LIBPNG_VERSION=1.6.44
|
||||
JPEGTURBO_VERSION=3.0.4
|
||||
OPENJPEG_VERSION=2.5.2
|
||||
|
@ -65,21 +61,15 @@ function build_brotli {
|
|||
}
|
||||
|
||||
function build_harfbuzz {
|
||||
if [[ "$HARFBUZZ_VERSION" == 8.5.0 ]]; then
|
||||
export FREETYPE_LIBS=-lfreetype
|
||||
export FREETYPE_CFLAGS=-I/usr/local/include/freetype2/
|
||||
build_simple harfbuzz $HARFBUZZ_VERSION https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION tar.xz --with-freetype=yes --with-glib=no
|
||||
export FREETYPE_LIBS=""
|
||||
export FREETYPE_CFLAGS=""
|
||||
else
|
||||
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
|
||||
(cd $out_dir \
|
||||
&& meson setup build --buildtype=release -Dfreetype=enabled -Dglib=disabled)
|
||||
(cd $out_dir/build \
|
||||
&& meson install)
|
||||
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
|
||||
cp /usr/local/lib64/libharfbuzz* /usr/local/lib
|
||||
fi
|
||||
python3 -m pip install meson ninja
|
||||
|
||||
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
|
||||
(cd $out_dir \
|
||||
&& meson setup build --buildtype=release -Dfreetype=enabled -Dglib=disabled)
|
||||
(cd $out_dir/build \
|
||||
&& meson install)
|
||||
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
|
||||
cp /usr/local/lib64/libharfbuzz* /usr/local/lib
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -155,11 +145,7 @@ if [[ -n "$IS_MACOS" ]]; then
|
|||
brew remove --ignore-dependencies webp
|
||||
fi
|
||||
|
||||
brew install meson pkg-config
|
||||
elif [[ -n "$IS_ALPINE" ]]; then
|
||||
apk add meson
|
||||
elif [[ "$HARFBUZZ_VERSION" != 8.5.0 ]]; then
|
||||
yum install -y meson
|
||||
brew install pkg-config
|
||||
fi
|
||||
|
||||
wrap_wheel_builder build
|
||||
|
|
2
.github/workflows/wheels.yml
vendored
2
.github/workflows/wheels.yml
vendored
|
@ -278,7 +278,7 @@ jobs:
|
|||
path: dist
|
||||
merge-multiple: true
|
||||
- name: Upload wheels to scientific-python-nightly-wheels
|
||||
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
|
||||
uses: scientific-python/upload-nightly-action@ccf29c805b5d0c1dc31fa97fcdb962be074cade3 # 0.6.0
|
||||
with:
|
||||
artifacts_path: dist
|
||||
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
|
||||
|
|
|
@ -5,15 +5,15 @@ Changelog (Pillow)
|
|||
11.0.0 (unreleased)
|
||||
-------------------
|
||||
|
||||
- Improved copying imagequant libraries #8420
|
||||
[radarhere]
|
||||
|
||||
- Use Capsule for WebP saving #8386
|
||||
[homm, radarhere]
|
||||
|
||||
- Fixed writing multiple StripOffsets to TIFF #8317
|
||||
[Yay295, radarhere]
|
||||
|
||||
- Shared imagequant libraries may be located within usr/lib64 #8407
|
||||
[radarhere]
|
||||
|
||||
- Fix dereference before checking for NULL in ImagingTransformAffine #8398
|
||||
[PavlNekrasov]
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -117,7 +117,7 @@ lint-fix:
|
|||
python3 -c "import black" > /dev/null 2>&1 || python3 -m pip install black
|
||||
python3 -m black .
|
||||
python3 -c "import ruff" > /dev/null 2>&1 || python3 -m pip install ruff
|
||||
python3 -m ruff --fix .
|
||||
python3 -m ruff check --fix .
|
||||
|
||||
.PHONY: mypy
|
||||
mypy:
|
||||
|
|
|
@ -23,19 +23,14 @@ else
|
|||
cargo cinstall --prefix=/usr --destdir=.
|
||||
|
||||
# Copy into place
|
||||
if [ -d "usr/lib64" ]; then
|
||||
lib="lib64"
|
||||
else
|
||||
lib="lib"
|
||||
fi
|
||||
sudo cp usr/$lib/libimagequant.so* /usr/lib/
|
||||
sudo find usr -name libimagequant.so* -exec cp {} /usr/lib/ \;
|
||||
sudo cp usr/include/libimagequant.h /usr/include/
|
||||
|
||||
if [ -n "$GITHUB_ACTIONS" ]; then
|
||||
# Copy to cache
|
||||
rm -rf ~/cache-$archive_name
|
||||
mkdir ~/cache-$archive_name
|
||||
cp usr/lib/libimagequant.so* ~/cache-$archive_name/
|
||||
find usr -name libimagequant.so* -exec cp {} ~/cache-$archive_name/ \;
|
||||
cp usr/include/libimagequant.h ~/cache-$archive_name/
|
||||
fi
|
||||
|
||||
|
|
|
@ -97,9 +97,13 @@ config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable"
|
|||
test-command = "cd {project} && .github/workflows/wheels-test.sh"
|
||||
test-extras = "tests"
|
||||
|
||||
[tool.ruff]
|
||||
fix = true
|
||||
[tool.black]
|
||||
exclude = "wheels/multibuild"
|
||||
|
||||
[tool.ruff]
|
||||
exclude = [ "wheels/multibuild" ]
|
||||
|
||||
fix = true
|
||||
lint.select = [
|
||||
"C4", # flake8-comprehensions
|
||||
"E", # pycodestyle errors
|
||||
|
|
|
@ -791,15 +791,15 @@ ImagingGenericTransform(
|
|||
char *out;
|
||||
double xx, yy;
|
||||
|
||||
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
|
||||
return (Imaging)ImagingError_ModeError();
|
||||
}
|
||||
|
||||
ImagingTransformFilter filter = getfilter(imIn, filterid);
|
||||
if (!filter) {
|
||||
return (Imaging)ImagingError_ValueError("bad filter number");
|
||||
}
|
||||
|
||||
if (!imOut || !imIn || strcmp(imIn->mode, imOut->mode) != 0) {
|
||||
return (Imaging)ImagingError_ModeError();
|
||||
}
|
||||
|
||||
ImagingCopyPalette(imOut, imIn);
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
|
Loading…
Reference in New Issue
Block a user