Alpaca icon indicating copy to clipboard operation
Alpaca copied to clipboard

Cannot build Alpaca using GNOME Builder

Open mags0ft opened this issue 6 months ago • 3 comments

Hello there,

I am unable to build Alpaca in the form it is present on the main branch. Building using flatpak-builder inside of GNOME Builder will throw an error related to the Pillow package:

flatpak-builder --arch=x86_64 --ccache --force-clean --download-only --disable-updates --stop-at=alpaca /home/magnus/.cache/gnome-builder/projects/Alpaca/flatpak/staging/x86_64-main /home/magnus/Dokumente/Coding/Alpaca/com.jeffser.Alpaca.json
Emptying app dir '/home/magnus/.cache/gnome-builder/projects/Alpaca/flatpak/staging/x86_64-main'
error: org.gnome.Sdk/x86_64/48 not installed
error: org.gnome.Sdk/x86_64/48 not installed
Downloading sources
Stopping at module alpaca
flatpak-builder --arch=x86_64 --ccache --force-clean --disable-updates --disable-download --stop-at=alpaca /home/magnus/.cache/gnome-builder/projects/Alpaca/flatpak/staging/x86_64-main /home/magnus/Dokumente/Coding/Alpaca/com.jeffser.Alpaca.json
Starting build of com.jeffser.Alpaca
Cache hit for python3-requests, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module python3-pillow in /home/magnus/Dokumente/Coding/Alpaca/.flatpak-builder/build/python3-pillow-2
========================================================================
Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pillow" --no-build-isolation
Using pip 25.0.1 from /usr/lib/python3.12/site-packages/pip (python 3.12)
Looking in links: file:///run/build/python3-pillow
Processing ./pillow-11.2.1.tar.gz
  Running command Preparing metadata (pyproject.toml)
  configuration error: `project.license` must be valid exactly by one definition (2 matches found):

      - keys:
          'file': {type: string}
        required: ['file']
      - keys:
          'text': {type: string}
        required: ['text']

  DESCRIPTION:
      `Project license <https://peps.python.org/pep-0621/#license>`_.

  GIVEN VALUE:
      "MIT-CMU"

  OFFENDING RULE: 'oneOf'

  DEFINITION:
      {
          "oneOf": [
              {
                  "properties": {
                      "file": {
                          "type": "string",
                          "$$description": [
                              "Relative path to the file (UTF-8) which contains the license for the",
                              "project."
                          ]
                      }
                  },
                  "required": [
                      "file"
                  ]
              },
              {
                  "properties": {
                      "text": {
                          "type": "string",
                          "$$description": [
                              "The license of the project whose meaning is that of the",
                              "`License field from the core metadata",
                              "<https://packaging.python.org/specifications/core-metadata/#license>`_."
                          ]
                      }
                  },
                  "required": [
                      "text"
                  ]
              }
          ]
      }
  Traceback (most recent call last):
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 175, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 1053, in <module>
    File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 160, in setup
      dist.parse_config_files()
    File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 652, in parse_config_files
      pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
    File "/usr/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 72, in apply_configuration
      config = read_configuration(filepath, True, ignore_option_errors, dist)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 140, in read_configuration
      validate(subset, filepath)
    File "/usr/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 61, in validate
      raise ValueError(f"{error}\n{summary}") from None
  ValueError: invalid pyproject.toml config: `project.license`.
  configuration error: `project.license` must be valid exactly by one definition (2 matches found):

      - keys:
          'file': {type: string}
        required: ['file']
      - keys:
          'text': {type: string}
        required: ['text']

  error: subprocess-exited-with-error
  
  × Preparing metadata (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/python /usr/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp5s8v2jlb
  cwd: /tmp/pip-install-_ukby2ae/pillow_e7e794f6a2e74a0dba703fc19b2bca33
  Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: module python3-pillow: Der Kindprozess wurde mit Status 1 beendet

Does anyone else have this issue and how can it be fixed?

Thanks in advance!

mags0ft avatar Jun 18 '25 11:06 mags0ft

My guess is that the download of Pillow somehow corrupted itself, Gnome Builder saves all the flatpak modules (like python libraries) so that they are not downloaded every time the project is built, maybe try to delete the .gnome-builder directory that should be at ~/Projects or next to wherever you cloned the repository to

Jeffser avatar Jun 18 '25 18:06 Jeffser

Unfortunately didn't fix it... :/

mags0ft avatar Jun 18 '25 21:06 mags0ft

Honestly this is quite strange, it does built on my laptop so I don't really understand what the problem might be, can you try building it using flatpak builder?

https://docs.flathub.org/docs/for-app-authors/submission#requirements

Jeffser avatar Jun 21 '25 17:06 Jeffser