Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Added brotli #320

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Added brotli #320

merged 1 commit into from
Sep 9, 2022

Conversation

radarhere
Copy link
Member

Helps python-pillow/Pillow#6554 by adding brotli.

After building brotli, delocate was unable to find the dependencies. I solved this by passing in /usr/local/lib through DYLD_LIBRARY_PATH, which allowed me to remove the custom build_openjpeg added in #294.

config.sh Outdated
fi
function build_brotli {
local cmake=$(get_modern_cmake)
local out_dir=$(fetch_unpack /~https://github.com/google/brotli/archive/v1.0.9.tar.gz)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this version as a constant above?

Do we still need OPENJPEG_VERSION there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've added a BROTLI_VERSION variable.

Yes, OPENJPEG_VERSION is still used by multibuild in

build_openjpeg

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Sep 7, 2022
@nulano
Copy link
Contributor

nulano commented Sep 7, 2022

Should the brotli license be added to dependency_licenses?

@radarhere
Copy link
Member Author

Ok, I've copied /~https://github.com/google/brotli/blob/master/LICENSE

@nulano any other feedback?

Copy link
Contributor

@nulano nulano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm the Linux wheel (3.10 manylinux_2_28 x86_64 to be exact) pass the test I added in python-pillow/Pillow#6562.

However, while I see libbrotlidec.1.0.9.dylib in Pillow-9.3.0.dev0-cp310-cp310-macosx_10_10_x86_64.whl, I do not see it in the ARM wheel (despite it being detected in the build log). Do you have an M1 mac you could use to check the test test_imagefont.py:test_woff2 from /~https://github.com/nulano/Pillow/tree/winbuild-update passes?

(I'm looking at the wheels from the previous commit since the LICENSE file commit is still building.)

@mergify mergify bot merged commit 3abe517 into python-pillow:main Sep 9, 2022
@radarhere
Copy link
Member Author

Oh, I didn't expect the automerge.

There was indeed a problem with the ARM wheels. Thanks for catching @nulano. I've removed the DYLD_LIBRARY_PATH / build_openjpeg change, and libbrotlidec.1.0.9.dylib is now inside.

@radarhere radarhere deleted the brotli branch September 9, 2022 00:52
@nulano
Copy link
Contributor

nulano commented Sep 9, 2022

Oh, I didn't expect the automerge.

Surprised me as well, the status page was showing a permission issue before.

The macOS wheels do look good now, but instead some of the manylinux no longer include brotli now. Specifically, I can see libbrotlidec in all 3.10 wheels except manylinux_2_17 and manylinux_2_28, and indeed the test is now being skipped on my system.

@radarhere
Copy link
Member Author

I've created #322 to fix the Linux wheels.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants