The package pkg_resources has been marked as obsolete for some time, and has been removed from Python 3.12. This PR replaces occurrences of pkg_resources with importlib.resources or its back-ported cousin importlib_resources for older Python versions.
Some extra basic tests were added to the build, that could have exposed the pkg_resources issue in time. These tests revealed additional problems with the generated SWIG bindings, which had become outdated as well. These files have been regenerated. The proper solution would be to generate these files during the build, instead of keeping them under version control in Git.
The package
pkg_resources
has been marked as obsolete for some time, and has been removed from Python 3.12. This PR replaces occurrences ofpkg_resources
withimportlib.resources
or its back-ported cousinimportlib_resources
for older Python versions.Some extra basic tests were added to the build, that could have exposed the
pkg_resources
issue in time. These tests revealed additional problems with the generated SWIG bindings, which had become outdated as well. These files have been regenerated. The proper solution would be to generate these files during the build, instead of keeping them under version control in Git.