ojii / pymaging

Pure Python imaging library with Python 2.6, 2.7, 3.1+ support

Home Page:http://pymaging.rtfd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wondering about pkg_resources

krruzic opened this issue · comments

I want to use this module in an app I'm working on for BB10 (https://github.com/krruzic/snappy) but this line in formats.py is making it not work. setup_tools isn't available on BlackBerry obviously and I don't even get what you're doing with it here. Any advice on how I could get it to work or what's going on would be appreciated.

Hi, could you point at the exact bit that confuses you?

Yeah for sure. From formats.py

def _populate(self):
    if self.loaded:
        return
    with self.write_lock:
        import pkg_resources
        for entry_point in pkg_resources.iter_entry_points('pymaging.formats'):
            format = entry_point.load()
            self.register(format)
        self.loaded = True

honestly I have no idea what I'm doing. I just want to use this to rotate images

EDIT: this is the error I'm getting if it wasn't obvious already

python     12  ImportError: No module named pkg_resources

Got it to work! Just had to grab pkg_resources.py out of setuptools hehe. Thanks!