inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.04k stars 237 forks source link

Port deprecated pkg_resources to importlib.resources #723

Closed alexfikl closed 3 months ago

alexfikl commented 3 months ago

This ports from pkg_resources to the newer importlib.resources as described in https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filename and removes an implicit runtime dependency on setuptools. It also needs a newer version of importlib.resources because the pre 3.9 version didn't support directories and pyopencl/cl is a directory in our case.

Not sure how to test this because the include path is already in the first path it looks at: join(abspath(dirname(__file__)), "cl"). I checked that the pkg_resources result is the same on my system. Does the CI test that at all?

inducer commented 3 months ago

I think this was added for some bizarre systems where the two disagree, I don't remember the specifics.

Does the CI test that at all?

No, not AFAIK.

Thanks for doing this, this is good enough for me.