bigcat88 / pillow_heif

Python library for working with HEIF images and plugin for Pillow.
BSD 3-Clause "New" or "Revised" License
217 stars 17 forks source link

Offline build #128

Closed bbhtt closed 1 year ago

bbhtt commented 1 year ago

Describe the bug

Hello, I'm trying to build this in a flatpak environment which has no network access, I added the necessary libraries listed in https://github.com/bigcat88/pillow_heif/blob/7319c506664e0c5e0f01b3dcd0576c7328a4c813/libheif/linux_build_libs.py#L12-L15

But it still seems to try downloading them for some reason. Is a fully offline build not possible?

========================================================================
Building module python3-pillow-heif in /srv/buildbot/worker/build-x86_64-4/build/.flatpak-builder/build/python3-pillow-heif-1
========================================================================
]2;flatpak-builder: Building python3-pillow-heif]2;flatpak-builder: Installing python3-pillow-heifRunning: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pillow-heif>=0.12.0" --no-build-isolation
FB: Running 'flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/python3-pillow-heif --nofilesystem=host:reset --filesystem=/srv/buildbot/worker/build-x86_64-4/build/.flatpak-builder/build/python3-pillow-heif-1 --bind-mount=/run/build/python3-pillow-heif=/srv/buildbot/worker/build-x86_64-4/build/.flatpak-builder/build/python3-pillow-heif-1 --build-dir=/run/build/python3-pillow-heif --bind-mount=/run/ccache=/srv/buildbot/worker/build-x86_64-4/build/.flatpak-builder/ccache --unshare=network --env=SOURCE_DATE_EPOCH=1691637318 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=BASEAPP_REMOVE_WEBENGINE=1 --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=64 /srv/buildbot/worker/build-x86_64-4/build/.flatpak-builder/rofiles/rofiles-wxYmbx /bin/sh -c 'pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pillow-heif>=0.12.0" --no-build-isolation'' on host
Using pip 23.1.2 from /usr/lib/python3.10/site-packages/pip (python 3.10)
Looking in links: file:///run/build/python3-pillow-heif
Processing ./pillow_heif-0.13.0.tar.gz
  Running command Preparing metadata (pyproject.toml)
  running dist_info
  creating /tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info
  writing /tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/dependency_links.txt
  writing requirements to /tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/SOURCES.txt'
  listing git files failed - pretending there aren't any
  reading manifest file '/tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files found matching '*.yaml'
  warning: no previously-included files found matching '*.yml'
  warning: no previously-included files found matching '.cirrus.star'
  no previously-included directories found matching 'ci'
  no previously-included directories found matching 'docs'
  no previously-included directories found matching 'docker'
  no previously-included directories found matching 'benchmarks'
  warning: no previously-included files matching '*' found under directory 'pi-heif'
  adding license file 'LICENSE.txt'
  adding license file 'LICENSES_bundled.txt'
  writing manifest file '/tmp/pip-modern-metadata-jr_l72lo/pillow_heif.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-jr_l72lo/pillow_heif-0.13.0.dist-info'
  Preparing metadata (pyproject.toml) ... [?25l[?25hdone
Requirement already satisfied: pillow>=9.1.1 in /app/lib/python3.10/site-packages (from pillow-heif>=0.12.0) (10.0.0)
Building wheels for collected packages: pillow-heif
  Running command Building wheel for pillow-heif (pyproject.toml)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-310
  creating build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/options.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/misc.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/heif.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/constants.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/as_plugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/_version.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/_lib_info.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/_deffered_error.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/__init__.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/HeifImagePlugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  copying pillow_heif/AvifImagePlugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif
  running build_ext
  Tool cmake with version 3.26.4 satisfy requirements.
  Tool nasm with version 2.16.01 satisfy requirements.
  tar: /tmp/ph_build_stuff/x265/download.tar.gz: Cannot open: No such file or directory
  tar: Error is not recoverable: exiting now
  Traceback (most recent call last):
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
      self.run_setup()
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 143, in <module>
    File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
      _build_ext.run(self)
    File "/usr/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "/usr/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "<string>", line 112, in build_extensions
    File "/tmp/pip-install-4b_iq5_j/pillow-heif_2e7e8dbcd4654c23872a1b3e6b6113c6/libheif/linux_build_libs.py", line 226, in build_libs
      build_lib_linux(LIBX265_URL, "x265", _is_musllinux)
    File "/tmp/pip-install-4b_iq5_j/pillow-heif_2e7e8dbcd4654c23872a1b3e6b6113c6/libheif/linux_build_libs.py", line 136, in build_lib_linux
      download_extract_to(url, _lib_path)
    File "/tmp/pip-install-4b_iq5_j/pillow-heif_2e7e8dbcd4654c23872a1b3e6b6113c6/libheif/linux_build_libs.py", line 56, in download_extract_to
      run(_tar_cmd.split(), check=True)
    File "/usr/lib/python3.10/subprocess.py", line 526, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['tar', '-xf', '/tmp/ph_build_stuff/x265/download.tar.gz', '-C', '/tmp/ph_build_stuff/x265', '--strip-components', '1']' returned non-zero exit status 2.
  error: subprocess-exited-with-error

  × Building wheel for pillow-heif (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpm1kufndh
  cwd: /tmp/pip-install-4b_iq5_j/pillow-heif_2e7e8dbcd4654c23872a1b3e6b6113c6
  Building wheel for pillow-heif (pyproject.toml) ... [?25l[?25herror
  ERROR: Failed building wheel for pillow-heif

Dependencies I added:

See the minimal manifest below

Steps/Code to Reproduce

  1. Install flatpak, flatpak-builder, set up the flathub repo
  2. flatpak install org.freedesktop.Platform//22.08, flatpak install org.freedesktop.Sdk//22.08
  3. Use this manifest:
app-id: com.example.test
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk

modules:

  - name: libaom
    buildsystem: cmake-ninja
    builddir: true
    config-opts:
      - -DBUILD_SHARED_LIBS=1
      - -DENABLE_EXAMPLES=OFF
      - -DENABLE_TESTDATA=OFF
      - -DENABLE_TESTS=OFF
      - -DENABLE_TOOLS=OFF
    sources:
      - type: archive
        url: https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz
        sha256: 42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887

  - name: libde265
    buildsystem: cmake-ninja
    sources:
      - type: archive
        url: https://github.com/strukturag/libde265/archive/v1.0.12/libde265-1.0.12.tar.gz
        sha256: c7e5443c9387ef2ee7bd3a25b4cfeb1a66d038584cf0ab21a4a28db64f224584
    cleanup:
      - /bin

  - name: x265
    builddir: true
    subdir: source
    buildsystem: cmake-ninja
    config-opts:
      - -DBUILD_SHARED_LIBS=ON
    sources:
      - type: archive
        url: https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz
        sha256: e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8

  - name: libheif
    buildsystem: cmake-ninja
    builddir: true
    config-opts:
      - -DAOM_ENCODER=ON
      - -DWITH_EXAMPLES=OFF
    sources:
      - type: archive
        url: https://github.com/strukturag/libheif/archive/v1.16.2/libheif-1.16.2.tar.gz
        sha256: d207f2ff5c86e6af3621c237f186130b985b7a9ff657875944b58ac5d27ba71c

  - name: python3-pillow-heif
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pillow-heif" --no-build-isolation
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/0f/8b/2ebaf9adcf4260c00f842154865f8730cf745906aa5dd499141fb6063e26/Pillow-10.0.0.tar.gz
        sha256: 9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396
      - type: file
        url: https://files.pythonhosted.org/packages/52/27/39f219e702744c6d7075626517de4ffe331550229e95897a26ba3e55b979/pillow_heif-0.13.0.tar.gz
        sha256: be337495d0be5accf4d6ea6614f61293c40c86dc8d3e5e6eb63661f90f472362
  1. flatpak-builder build --force-clean test.yaml
  2. See above error

Expected Results

It should find that libaom, libde265, libheif and x265 are already installed

Actual Results

Tries to download them

Versions

0.13.0
bigcat88 commented 1 year ago

Yes, you can, first, when building, the presence of the libheif library is checked, if it is, then nothing is built and does not download.

It checks for libheif with the commands: gcc -llibheif and gcc -lheif

https://github.com/bigcat88/pillow_heif/blob/7319c506664e0c5e0f01b3dcd0576c7328a4c813/libheif/linux_build_libs.py#L108-L116

bigcat88 commented 1 year ago
/usr/lib/gcc/aarch64-unknown-linux-gnu/12.2.0/../../../../aarch64-unknown-linux-gnu/bin/ld: cannot find -lheif: No such file or directory
collect2: error: ld returned 1 exit status

yeah, in Flatpak this command do not see that libheif is installed. Need new universal command/method for this, will look later into this...

EDITED: Need to implement searching libraries using pkg-config if it is available in the system.

bbhtt commented 1 year ago

It checks for libheif with the commands: gcc -llibheif and gcc -lheif

It's because I think gcc looks only in /usr, but /usr in the sandbox is from the runtime and is read-only. The libraries in the manifest gets installed to /app

gcc -I /app/share/include -L /app/lib -lheif works:

$ flatpak run --command=sh com.example.test

[📦 com.example.test ~]$ gcc -I /app/share/include -L /app/lib -lheif

/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libx265.so.199, needed by /app/lib/libheif.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: warning: libde265.so, needed by /app/lib/libheif.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
/buildstream-build/csu/../sysdeps/x86_64/start.S:103: undefined reference to `main'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_flush_data'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_chroma_format'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_release_next_picture'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_plane'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_init'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `x265_api_get_199'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_new_decoder'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_full_range_flag'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_height'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_free'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_version'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_decode'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_push_NAL'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_start_worker_threads'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_free_decoder'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_transfer_characteristics'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_colour_primaries'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_width'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_bits_per_pixel'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_image_matrix_coefficients'
/usr/lib/gcc/x86_64-unknown-linux-gnu/12.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libheif.so: undefined reference to `de265_get_next_picture'
bigcat88 commented 1 year ago

@bbhtt Good afternoon. Could you check this pull request(#130) - does it fix your problem or not? I'm not very familiar with flatpack, I don't know how to upgrade the YML file so that it downloads the archive from the pull request - to check.

bbhtt commented 1 year ago

@bbhtt Good afternoon. Could you check this pull request(#130) - does it fix your problem or not? I'm not very familiar with flatpack, I don't know how to upgrade the YML file so that it downloads the archive from the pull request - to check.

Thank you it seems to work:

  Package heif was not found in the pkg-config search path.
  Perhaps you should add the directory containing `heif.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'heif', required by 'virtual:world', not found
  Looking for `heif` using pkg-config.
  Looking for `libheif` using pkg-config.
  Found `libheif` using pkg-config: (['/app/lib'], ['/app/include', '/usr/include'])
  building '_pillow_heif' extension
Build log ``` [...] ======================================================================== Building module python3-pillow-heif in /home/wirt/Downloads/test/.flatpak-builder/build/python3-pillow-heif-1 ======================================================================== Switched to branch 'libheif-extra-build-dirs' Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} . --no-build-isolation Using pip 23.1.2 from /usr/lib/python3.10/site-packages/pip (python 3.10) Looking in links: file:///run/build/python3-pillow-heif Processing /run/build/python3-pillow-heif Running command Preparing metadata (pyproject.toml) running dist_info creating /tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info writing /tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/PKG-INFO writing dependency_links to /tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/dependency_links.txt writing requirements to /tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/requires.txt writing top-level names to /tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/top_level.txt writing manifest file '/tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/SOURCES.txt' reading manifest file '/tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching '*.yaml' warning: no previously-included files found matching '*.yml' warning: no previously-included files found matching '.cirrus.star' no previously-included directories found matching 'ci' no previously-included directories found matching 'docs' no previously-included directories found matching 'docker' no previously-included directories found matching 'benchmarks' warning: no previously-included files matching '*' found under directory 'pi-heif' adding license file 'LICENSE.txt' adding license file 'LICENSES_bundled.txt' writing manifest file '/tmp/pip-modern-metadata-gq6a1fuc/pillow_heif.egg-info/SOURCES.txt' creating '/tmp/pip-modern-metadata-gq6a1fuc/pillow_heif-0.13.0.dist-info' Preparing metadata (pyproject.toml) ... done Requirement already satisfied: pillow>=9.1.1 in /app/lib/python3.10/site-packages (from pillow-heif==0.13.0) (10.0.0) Building wheels for collected packages: pillow-heif Running command Building wheel for pillow-heif (pyproject.toml) running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/AvifImagePlugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/HeifImagePlugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/__init__.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/_deffered_error.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/_lib_info.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/_version.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/as_plugin.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/constants.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/heif.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/misc.py -> build/lib.linux-x86_64-cpython-310/pillow_heif copying pillow_heif/options.py -> build/lib.linux-x86_64-cpython-310/pillow_heif running build_ext Package heif was not found in the pkg-config search path. Perhaps you should add the directory containing `heif.pc' to the PKG_CONFIG_PATH environment variable Package 'heif', required by 'virtual:world', not found Looking for `heif` using pkg-config. Looking for `libheif` using pkg-config. Found `libheif` using pkg-config: (['/app/lib'], ['/app/include', '/usr/include']) building '_pillow_heif' extension creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/pillow_heif x86_64-unknown-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -fPIC -I/app/include -I/usr/include -I/usr/include/python3.10 -I/usr/include/x86_64-linux-gnu/python3.10 -c pillow_heif/_pillow_heif.c -o build/temp.linux-x86_64-cpython-310/pillow_heif/_pillow_heif.o -Ofast -Werror x86_64-unknown-linux-gnu-gcc -shared -Wl,-z,relro,-z,now -Wl,--as-needed -Wl,-z,relro,-z,now -Wl,--as-needed -L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer build/temp.linux-x86_64-cpython-310/pillow_heif/_pillow_heif.o -L/app/lib -L/usr/lib -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu -lheif -o build/lib.linux-x86_64-cpython-310/_pillow_heif.cpython-310-x86_64-linux-gnu.so installing to build/bdist.linux-x86_64/wheel running install running install_lib creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/wheel creating build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/AvifImagePlugin.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/HeifImagePlugin.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/__init__.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/_deffered_error.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/_lib_info.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/_version.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/as_plugin.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/constants.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/heif.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/misc.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/pillow_heif/options.py -> build/bdist.linux-x86_64/wheel/pillow_heif copying build/lib.linux-x86_64-cpython-310/_pillow_heif.cpython-310-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel running install_egg_info running egg_info creating pillow_heif.egg-info writing pillow_heif.egg-info/PKG-INFO writing dependency_links to pillow_heif.egg-info/dependency_links.txt writing requirements to pillow_heif.egg-info/requires.txt writing top-level names to pillow_heif.egg-info/top_level.txt writing manifest file 'pillow_heif.egg-info/SOURCES.txt' reading manifest file 'pillow_heif.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files found matching '*.yaml' warning: no previously-included files found matching '*.yml' warning: no previously-included files found matching '.cirrus.star' no previously-included directories found matching 'ci' no previously-included directories found matching 'docs' no previously-included directories found matching 'docker' no previously-included directories found matching 'benchmarks' warning: no previously-included files matching '*' found under directory 'pi-heif' adding license file 'LICENSE.txt' adding license file 'LICENSES_bundled.txt' writing manifest file 'pillow_heif.egg-info/SOURCES.txt' Copying pillow_heif.egg-info to build/bdist.linux-x86_64/wheel/pillow_heif-0.13.0-py3.10.egg-info running install_scripts creating build/bdist.linux-x86_64/wheel/pillow_heif-0.13.0.dist-info/WHEEL creating '/tmp/pip-wheel-p753gus5/.tmp-8yl96usx/pillow_heif-0.13.0-cp310-cp310-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it adding '_pillow_heif.cpython-310-x86_64-linux-gnu.so' adding 'pillow_heif/AvifImagePlugin.py' adding 'pillow_heif/HeifImagePlugin.py' adding 'pillow_heif/__init__.py' adding 'pillow_heif/_deffered_error.py' adding 'pillow_heif/_lib_info.py' adding 'pillow_heif/_version.py' adding 'pillow_heif/as_plugin.py' adding 'pillow_heif/constants.py' adding 'pillow_heif/heif.py' adding 'pillow_heif/misc.py' adding 'pillow_heif/options.py' adding 'pillow_heif-0.13.0.dist-info/LICENSE.txt' adding 'pillow_heif-0.13.0.dist-info/LICENSES_bundled.txt' adding 'pillow_heif-0.13.0.dist-info/METADATA' adding 'pillow_heif-0.13.0.dist-info/WHEEL' adding 'pillow_heif-0.13.0.dist-info/top_level.txt' adding 'pillow_heif-0.13.0.dist-info/RECORD' removing build/bdist.linux-x86_64/wheel Building wheel for pillow-heif (pyproject.toml) ... done Created wheel for pillow-heif: filename=pillow_heif-0.13.0-cp310-cp310-linux_x86_64.whl size=97316 sha256=6a290d680c1ae40b9668f2df50d53ed4661fcca6de8c8341715b42f173100395 Stored in directory: /home/wirt/.cache/pip/wheels/20/ea/f4/bd102fa124faefccab440a7f03f2745a16f7dfec5a1d655947 Successfully built pillow-heif Installing collected packages: pillow-heif Successfully installed pillow-heif-0.13.0 compressing debuginfo in: /home/wirt/Downloads/test/.flatpak-builder/rofiles/rofiles-mISDzY/files/lib/python3.10/site-packages/_pillow_heif.cpython-310-x86_64-linux-gnu.so processing: /home/wirt/Downloads/test/.flatpak-builder/rofiles/rofiles-mISDzY/files/lib/python3.10/site-packages/_pillow_heif.cpython-310-x86_64-linux-gnu.so [27] .debug_aranges compressed -> .zdebug_aranges (176 => 77 43.75%) [28] .debug_info compressed -> .zdebug_info (41394 => 20842 50.35%) [29] .debug_abbrev compressed -> .zdebug_abbrev (1896 => 811 42.77%) [30] .debug_line compressed -> .zdebug_line (22580 => 8564 37.93%) [31] .debug_str compressed -> .zdebug_str (15428 => 4916 31.86%) [32] .debug_line_str compressed -> .zdebug_line_str (631 => 327 51.82%) [33] .debug_loclists compressed -> .zdebug_loclists (29178 => 12507 42.86%) [34] .debug_rnglists compressed -> .zdebug_rnglists (4064 => 2727 67.10%) [37] Updating section string table stripping /home/wirt/Downloads/test/.flatpak-builder/rofiles/rofiles-mISDzY/files/lib/python3.10/site-packages/_pillow_heif.cpython-310-x86_64-linux-gnu.so to /home/wirt/Downloads/test/.flatpak-builder/rofiles/rofiles-mISDzY/files/lib/debug/lib/python3.10/site-packages/_pillow_heif.cpython-310-x86_64-linux-gnu.so.debug Committing stage build-python3-pillow-heif to cache ```
Flatpak manifest ```yaml app-id: com.example.test runtime: org.freedesktop.Platform runtime-version: '22.08' sdk: org.freedesktop.Sdk modules: - name: libaom buildsystem: cmake-ninja builddir: true config-opts: - -DBUILD_SHARED_LIBS=1 - -DENABLE_EXAMPLES=OFF - -DENABLE_TESTDATA=OFF - -DENABLE_TESTS=OFF - -DENABLE_TOOLS=OFF sources: - type: archive url: https://storage.googleapis.com/aom-releases/libaom-3.6.1.tar.gz sha256: 42b862f58b3d00bd3902d2dc469526574f5b012e5b178e6a9652845a113d6887 - name: libde265 buildsystem: cmake-ninja sources: - type: archive url: https://github.com/strukturag/libde265/archive/v1.0.12/libde265-1.0.12.tar.gz sha256: c7e5443c9387ef2ee7bd3a25b4cfeb1a66d038584cf0ab21a4a28db64f224584 cleanup: - /bin - name: x265 builddir: true subdir: source buildsystem: cmake-ninja config-opts: - -DBUILD_SHARED_LIBS=ON sources: - type: archive url: https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.5.tar.gz sha256: e70a3335cacacbba0b3a20ec6fecd6783932288ebc8163ad74bcc9606477cae8 - name: libheif buildsystem: cmake-ninja builddir: true config-opts: - -DAOM_ENCODER=ON - -DWITH_EXAMPLES=OFF sources: - type: archive url: https://github.com/strukturag/libheif/archive/v1.16.2/libheif-1.16.2.tar.gz sha256: d207f2ff5c86e6af3621c237f186130b985b7a9ff657875944b58ac5d27ba71c - name: python3-Pillow buildsystem: simple build-commands: - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "Pillow" --no-build-isolation sources: - type: file url: https://files.pythonhosted.org/packages/0f/8b/2ebaf9adcf4260c00f842154865f8730cf745906aa5dd499141fb6063e26/Pillow-10.0.0.tar.gz sha256: 9c82b5b3e043c7af0d95792d0d20ccf68f61a1fec6b3530e718b688422727396 - name: python3-pillow-heif buildsystem: simple build-commands: - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} . --no-build-isolation sources: - type: git url: https://github.com/bigcat88/pillow_heif.git branch: libheif-extra-build-dirs commit: 4b4ad2ab7dfa5d222f8bbf2d0375ecd06e8b8dfc ```
bigcat88 commented 1 year ago

Fixed in 0.13.1