Skip to content

[Python] Remove usage of deprecated pkg_resources in setup.py #43532

@jorisvandenbossche

Description

@jorisvandenbossche

See https://setuptools.pypa.io/en/latest/pkg_resources.html

We currently use this to get the numpy include directories:

numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')

The general deprecation of pkg_resources points to use importlib instead (https://docs.python.org/3.11/library/importlib.resources.html#module-importlib.resources), but for this specific usage I think we just should use numpy.get_include() (https://numpy.org/devdocs/reference/generated/numpy.get_include.html)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions