Eliminating pkg_resources
Written by
on
in
Snaking.
Just checked in changes to PyOpenGL to strip out the use of pkg_resources. That should avoid the problems we've been seeing where packaging utilities and the like can't handle the entry-point registrations. Still need to work out something to avoid speculatively loading e.g. numpy.
Comments
Comments are closed.
Pingbacks
Pingbacks are closed.
PJ Eby on 09/08/2008 9:32 a.m. #
What problems, with which packaging utilities? I'd like to know for future reference, since, if everybody backs off due to issues, the issues will never get fixed.
Florent Aide on 09/08/2008 3:15 p.m. #
Being a heavy pkg_resources user I'd also like to know which problem you encountered that forced you to find an alternative solution.
For my part I do not even want to remember how I managed to code before I found pkg_resources.
Mike Fletcher on 09/08/2008 8:16 p.m. #
The ones we tried: py2exe, py2app, pyinstaller.
I managed to hack py2exe to work with PyOpenGL... then it broke with the next version of py2exe.
I managed to hack pyinstaller to work with PyOpenGL (with a per-application bit of hack code), but it wasn't elegant or automatic.
We also are getting lots of people who don't install packages by default, so wind up creating support emails to figure out why it's not working.
Lastly, some just *won't* install the package on ideological grounds, feeling that a library (as distinct from an application or framework) should never require an installation procedure.
Basically, while I really like pkg_resources for big package organization, the few places we're using it in PyOpenGL mean that we're losing a lot of real-world utility for a fairly minor piece of functionality (the functionality can be replicated with a few dozen lines of Python code in our case).
PJ Eby on 09/08/2008 8:29 p.m. #
Ah, good to know. I thought you were talking about *system* packaging tools like apt, rpm, etc.
saluk on 09/27/2008 5:45 a.m. #
LIES. I just tried to py2exe with the latest pyopengl from the 12, and it complained about missing pkg_resources. What gives?
Mike Fletcher on 09/27/2008 8:14 a.m. #
More "untested assumption". We don't use pkg_resources anywhere in PyOpenGL. It could be that setuptools (which is what I'm still using for the setup script) requires pkg_resources.
cris on 10/02/2008 11:02 a.m. #
Oh yes you do.
PyOpenGL-3.0.0b5-py2.5.egg/OpenGL/platform/__init__.py
for one
Mike Fletcher on 10/02/2008 4:01 p.m. #
IIRC, it was between b5 and b6 that I eliminated pkg_resources... b6 was released about a week after this post, incidentally...