Skip to content

BUG: cannot easily override a cython Include #2905

@mattip

Description

@mattip

I am trying to vendor numpy.pxd (or numpy/__init__.pxd) into numpy. It seems the file in Includes/numpy/__init__.pxd is seen before mine when I try cimport numpy.

To reproduce: copy the __init__.pxd from Includes/numpy into site-packages/numpy, and add garbage in the original file so using it will crash cython (I used xxxx = xxxxxxxxx). Then build a project that calls cimport numpy such as pandas. If the copy is found, cythonize will succeed. If the original version is found, cythonize will crash.

I am willing to work on a PR, but need some direction as to where to look for the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions