Skip to content

Shims required to support GEOS version-specific functions in Cython  #255

@brendan-ward

Description

@brendan-ward

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    to-shapelyThis issue needs to be transferred to shapely

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions