openzim / python-libzim

Libzim binding for Python: read/write ZIM files in Python
https://pypi.org/project/libzim/
GNU General Public License v3.0
60 stars 19 forks source link

Why are Linux platforms limited to x86_64 and aarch64? #172

Closed legoktm closed 10 months ago

legoktm commented 10 months ago

In https://github.com/openzim/python-libzim/commit/ded83079dcaf4735a727bcc57d908820dc2a5746 the check for a supported platform was moved from the download_libzim function to something that runs for all builds, regardless of whether you're downloading libzim or using system libzim.

Context: in Debian we're currently building libzim for a very diverse set of architectures: https://buildd.debian.org/status/package.php?p=libzim and python-libzim built on all of those architectures too.

When I try to build on i386 (via CI), I get an error like:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/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/dist-packages/setuptools/build_meta.py", line 434, in build_wheel
    return self._build_with_temp_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 341, in run_setup
    exec(code, locals())
  File "<string>", line 472, in <module>
  File "<string>", line 104, in check_platform
NotImplementedError: Platform Linux/i686 is not supported.

Should the platform check be moved back to the download function or is there some other reason python-libzim should only be built for x86_64 and aarch64?

rgaudin commented 10 months ago

@legoktm thank you for bringing this up. It should indeed be limited to the download part.

rgaudin commented 10 months ago

@legoktm please let us know if there's anything else preventing debian packaging as we're about to make a release.

legoktm commented 10 months ago

Nope this was it, thanks!