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

Ensure compatibility with a single shared libvips library #444

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

kleisauke
Copy link
Member

See: #443

Tested on Linux using this Dockerfile:

Details
# Build and run with:
# docker build -t pyvips-libvips-packaging .
# docker run -it --rm pyvips-libvips-packaging
FROM python:3.12-slim-bookworm

LABEL maintainer="Kleis Auke Wolthuizen <info@kleisauke.nl>"

ARG VIPS_VERSION=8.15.0

WORKDIR /opt/libvips

# Update packages
RUN apt-get update -q \
    # Install needed dependencies
    && apt-get install -qy --no-install-recommends \
        ca-certificates \
        curl \
        git \
    # Download pre-built libvips binaries
    && curl -Ls https://github.com/kleisauke/libvips-packaging/releases/download/v$VIPS_VERSION/libvips-$VIPS_VERSION-linux-x64.tar.gz | tar -xzC .

WORKDIR /app

# Ensure dynamic linker finds the pre-built libvips binaries
ENV LD_LIBRARY_PATH=/opt/libvips/lib

RUN pip install --user git+https://github.com/kleisauke/pyvips.git@single-shared-vips-compat \
    && pip show pyvips

CMD ["python"]

And on Windows by using the -static (not static-ffi) binaries from:
https://github.com/libvips/build-win64-mxe/releases/tag/v8.15.1

@jcupitt jcupitt merged commit c380493 into libvips:master Jan 4, 2024
6 checks passed
@jcupitt
Copy link
Member

jcupitt commented Jan 4, 2024

Nice!

I vaguely remember needing separate opens for glib and gobject on some *nix platform, but of course I can't remember which, and this patch seems to work fine.

@kleisauke kleisauke deleted the single-shared-vips-compat branch January 4, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants