mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 17:54:32 +03:00
Correct paths used for Linux build.
This commit is contained in:
parent
8308bf361e
commit
c74a5bdd85
31
.github/workflows/wheels-dependencies.sh
vendored
31
.github/workflows/wheels-dependencies.sh
vendored
|
@ -26,8 +26,6 @@ OPENJPEG_VERSION=2.5.2
|
||||||
XZ_VERSION=5.6.3
|
XZ_VERSION=5.6.3
|
||||||
TIFF_VERSION=4.6.0
|
TIFF_VERSION=4.6.0
|
||||||
LCMS2_VERSION=2.16
|
LCMS2_VERSION=2.16
|
||||||
RAQM_VERSION=0.10.2
|
|
||||||
FRIBIDI_VERSION=1.0.16
|
|
||||||
if [[ -n "$IS_MACOS" ]]; then
|
if [[ -n "$IS_MACOS" ]]; then
|
||||||
GIFLIB_VERSION=5.2.2
|
GIFLIB_VERSION=5.2.2
|
||||||
else
|
else
|
||||||
|
@ -63,12 +61,8 @@ function build_brotli {
|
||||||
local cmake=$(get_modern_cmake)
|
local cmake=$(get_modern_cmake)
|
||||||
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-$BROTLI_VERSION.tar.gz)
|
local out_dir=$(fetch_unpack https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz brotli-$BROTLI_VERSION.tar.gz)
|
||||||
(cd $out_dir \
|
(cd $out_dir \
|
||||||
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
|
&& $cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
|
||||||
&& make install)
|
&& make install)
|
||||||
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
|
|
||||||
cp $BUILD_PREFIX/lib64/libbrotli* $BUILD_PREFIX/lib
|
|
||||||
cp $BUILD_PREFIX/lib64/pkgconfig/libbrotli* $BUILD_PREFIX/lib/pkgconfig
|
|
||||||
fi
|
|
||||||
touch brotli-stamp
|
touch brotli-stamp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,27 +72,12 @@ function build_harfbuzz {
|
||||||
|
|
||||||
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
|
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 \
|
(cd $out_dir \
|
||||||
&& meson setup build --prefix=$BUILD_PREFIX --buildtype=release -Dfreetype=enabled -Dglib=disabled)
|
&& meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=release -Dfreetype=enabled -Dglib=disabled)
|
||||||
(cd $out_dir/build \
|
(cd $out_dir/build \
|
||||||
&& meson install)
|
&& meson install)
|
||||||
if [[ "$MB_ML_LIBC" == "manylinux" ]]; then
|
|
||||||
cp $BUILD_PREFIX/lib64/libharfbuzz* $BUILD_PREFIX/lib
|
|
||||||
fi
|
|
||||||
touch harfbuzz-stamp
|
touch harfbuzz-stamp
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_raqm {
|
|
||||||
if [ -e raqm-stamp ]; then return; fi
|
|
||||||
python3 -m pip install meson ninja
|
|
||||||
|
|
||||||
local out_dir=$(fetch_unpack https://github.com/HOST-Oman/libraqm/releases/download/v$RAQM_VERSION/raqm-$RAQM_VERSION.tar.xz raqm-$RAQM_VERSION.tar.xz)
|
|
||||||
(cd $out_dir \
|
|
||||||
&& meson setup build --prefix=$BUILD_PREFIX)
|
|
||||||
(cd $out_dir/build \
|
|
||||||
&& meson install)
|
|
||||||
touch raqm-stamp
|
|
||||||
}
|
|
||||||
|
|
||||||
function build {
|
function build {
|
||||||
build_xz
|
build_xz
|
||||||
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
|
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
|
||||||
|
@ -133,9 +112,6 @@ function build {
|
||||||
build_libpng
|
build_libpng
|
||||||
build_lcms2
|
build_lcms2
|
||||||
build_openjpeg
|
build_openjpeg
|
||||||
if [ -f $BUILD_PREFIX/lib64/libopenjp2.so ]; then
|
|
||||||
cp $BUILD_PREFIX/lib64/libopenjp2.so $BUILD_PREFIX/lib
|
|
||||||
fi
|
|
||||||
|
|
||||||
ORIGINAL_CFLAGS=$CFLAGS
|
ORIGINAL_CFLAGS=$CFLAGS
|
||||||
CFLAGS="$CFLAGS -O3 -DNDEBUG"
|
CFLAGS="$CFLAGS -O3 -DNDEBUG"
|
||||||
|
@ -190,6 +166,9 @@ if [[ -n "$IS_MACOS" ]]; then
|
||||||
build_pkg_config
|
build_pkg_config
|
||||||
# Ensure cmake is available
|
# Ensure cmake is available
|
||||||
python3 -m pip install cmake
|
python3 -m pip install cmake
|
||||||
|
else
|
||||||
|
# Ensure that any built libraries are on the linker path.
|
||||||
|
export LD_LIBRARY_PATH=$BUILD_PREFIX/lib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wrap_wheel_builder build
|
wrap_wheel_builder build
|
||||||
|
|
|
@ -104,6 +104,10 @@ test-extras = "tests"
|
||||||
[tool.cibuildwheel.macos.environment]
|
[tool.cibuildwheel.macos.environment]
|
||||||
PATH = "$(pwd)/build/deps/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin"
|
PATH = "$(pwd)/build/deps/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin"
|
||||||
|
|
||||||
|
[tool.cibuildwheel.linux.environment]
|
||||||
|
LD_LIBRARY_PATH = "$(pwd)/build/deps/lib"
|
||||||
|
PKG_CONFIG_PATH = "$(pwd)/build/deps/lib/pkgconfig:$(pwd)/build/deps/share/pkgconfig"
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
exclude = "wheels/multibuild"
|
exclude = "wheels/multibuild"
|
||||||
|
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -131,7 +131,7 @@ _LIB_IMAGING = (
|
||||||
"codec_fd",
|
"codec_fd",
|
||||||
)
|
)
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = True
|
||||||
|
|
||||||
|
|
||||||
class DependencyException(Exception):
|
class DependencyException(Exception):
|
||||||
|
@ -479,7 +479,6 @@ class pil_build_ext(build_ext):
|
||||||
pkg_config = None
|
pkg_config = None
|
||||||
if _cmd_exists(os.environ.get("PKG_CONFIG", "pkg-config")):
|
if _cmd_exists(os.environ.get("PKG_CONFIG", "pkg-config")):
|
||||||
pkg_config = _pkg_config
|
pkg_config = _pkg_config
|
||||||
|
|
||||||
#
|
#
|
||||||
# add configured kits
|
# add configured kits
|
||||||
for root_name, lib_name in {
|
for root_name, lib_name in {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user