Eliminating pkg_resources

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.


  1. PJ Eby

    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.

  2. Florent Aide

    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.

  3. Mike Fletcher

    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).

  4. PJ Eby

    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.

  5. saluk

    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?

  6. Mike Fletcher

    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.

  7. cris

    cris on 10/02/2008 11:02 a.m. #

    Oh yes you do.


    for one

  8. Mike Fletcher

    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...

Comments are closed.


Pingbacks are closed.