ESA-VirES / VirES-Python-Client

viresclient is a Python package for easy access to Swarm & Aeolus products as xarray.Dataset
https://viresclient.readthedocs.io
MIT License
14 stars 1 forks source link

Install fails on Github runners for Apple ARM #109

Open smithara opened 2 months ago

smithara commented 2 months ago

The macos-latest runner now points to macos-14 using ARM architecture. The netCDF4 or tables dependency is failing here:

Python 3.8:

Collecting netCDF4>=1.5.3 (from viresclient==0.11.6)
  Downloading netCDF4-1.6.5.tar.gz (764 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 765.0/765.0 kB 22.2 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      Package hdf5 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `hdf5.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'hdf5' found
      reading from setup.cfg...

          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /Users/runner/include ...
      hdf5 headers not found in /Users/runner/include
      checking /usr/local/include ...
      hdf5 headers not found in /usr/local/include
      checking /sw/include ...
      hdf5 headers not found in /sw/include
      checking /opt/include ...
      hdf5 headers not found in /opt/include
      checking /opt/local/include ...
      hdf5 headers not found in /opt/local/include
      checking /opt/homebrew/include ...
      hdf5 headers not found in /opt/homebrew/include
      checking /usr/include ...
      hdf5 headers not found in /usr/include
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/pip-build-env-bkvfkya0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/pip-build-env-bkvfkya0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/pip-build-env-bkvfkya0/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 457, in <module>
        File "<string>", line 398, in _populate_hdf5_info
      ValueError: did not find HDF5 headers
      [end of output]

Python 3.9 - 3.11:

Collecting tables>=3.4.4 (from viresclient==0.11.6)
  Downloading tables-3.9.2.tar.gz (4.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 57.7 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      /var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/H5closem8a_cz7n.c:1:10: fatal error: 'H5public.h' file not found
      #include "H5public.h"
               ^~~~~~~~~~~~
      1 error generated.
      cpuinfo failed, assuming no CPU features: 'flags'
      * Using Python 3.11.9 (v3.11.9:de54cf5be3, Apr  2 2024, 07:12:50) [Clang 13.0.0 (clang-1300.0.29.30)]
      * Found cython 3.0.10
      * USE_PKGCONFIG: True
      .. ERROR:: Could not find a local HDF5 installation.
         You may need to explicitly state where your local HDF5 headers and
         library can be found by setting the ``HDF5_DIR`` environment
         variable or by using the ``--hdf5`` command-line option.
      [end of output]

I guess it might be addressed by adding brew install hdf5 but I'm not clear why hdf5 is not being provided correctly by the python packages or if it is really necessary