On 10 Aug 2015, at 16:23, Benny Kjær Nielsen wrote:

Thanks, that's obviously the problem. I'll look into making the script more robust.

It’s generally bad practice to install Python packages (other than virtualenv) into the system site packages.

This should work…

Create a virtualenv inside the bundle itself and install Pygments there.

    sudo easy_install pip
    sudo pip install virtualenv
    # in the bundle’s directory
    virtualenv env
    env/bin/pip install pygments

Then update the script to call `env/bin/pygmentize`.

Or look at how I did it with BeautifulSoup in Quicksilver. I don’t even think I needed `virtualenv`, but that was a long time ago and I’ve forgotten.

Other considerations:

* You should make sure the bundle that gets pushed out doesn’t include the compiled files. Adding `*.pyc` to Git’s ignore list should do it. * This means MailMate will always use that copy of Pygments and not the one the user has installed in some other location (like `/usr/local`). As a result… * Custom color schemes from PyPI would have to be installed into the virtualenv, too. * You’ll always be able to include a “known to work” version of Pygments.

--
Rob McBroom
http://www.skurfer.com/
_______________________________________________
mailmate mailing list
mailmate@lists.freron.com
http://lists.freron.com/listinfo/mailmate

Reply via email to