py-netcdf4 %oneapi: cflags append -Wno-error=int-conversion (#43629)

This commit is contained in:
eugeneswalker 2024-04-18 10:11:24 -07:00 committed by GitHub
parent ac0040f67d
commit 019058226f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,6 +48,13 @@ class PyNetcdf4(PythonPackage):
# following patch disables the usage of pkg-config at all. # following patch disables the usage of pkg-config at all.
patch("disable_pkgconf.patch") patch("disable_pkgconf.patch")
def flag_handler(self, name, flags):
if name == "cflags":
if self.spec.satisfies("%oneapi"):
flags.append("-Wno-error=int-conversion")
return flags, None, None
def setup_build_environment(self, env): def setup_build_environment(self, env):
"""Ensure installed netcdf and hdf5 libraries are used""" """Ensure installed netcdf and hdf5 libraries are used"""
# Explicitly set these variables so setup.py won't erroneously pick up # Explicitly set these variables so setup.py won't erroneously pick up