You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard approach of declaring an entry for a GEOS function in _geos.pxd does not work when the function is not available in a given older version of GEOS.
In the C extension, we are able to use macros like GEOS_SINCE_3_7_0 to conditionally include these for the compiler.
I don't see a similar mechanism for Cython.
It looks like other projects (e.g,. Fiona) deal with this by defining shim *.pxd files that are dynamically selected and used for the build based on the targeted version of the C library. I'm not yet sure how those handle functions that were introduced into later versions of the C library.
Is there a better alternative approach?
The text was updated successfully, but these errors were encountered:
One challenge here compared to rasterio / Fiona is that we don't require an environment variable indicating GEOS version when geos-config is not available (e.g., on Windows?). However, it might be a good idea for us to do so in order to check and enforce minimum GEOS version, and then using compile_time_env in setup.py becomes straightforward.
The standard approach of declaring an entry for a GEOS function in
_geos.pxd
does not work when the function is not available in a given older version of GEOS.In the C extension, we are able to use macros like
GEOS_SINCE_3_7_0
to conditionally include these for the compiler.I don't see a similar mechanism for Cython.
It looks like other projects (e.g,. Fiona) deal with this by defining shim
*.pxd
files that are dynamically selected and used for the build based on the targeted version of the C library. I'm not yet sure how those handle functions that were introduced into later versions of the C library.Is there a better alternative approach?
The text was updated successfully, but these errors were encountered: