<div class="markdown">
<p dir="auto">On 10 Aug 2015, at 16:23, Benny Kjær Nielsen wrote:</p>
<blockquote>
<p dir="auto">Thanks, that's obviously the problem. I'll look into making the script more robust.</p>
</blockquote>
<p dir="auto">It’s generally bad practice to install Python packages (other than virtualenv) into the system site packages.</p>
<p dir="auto">This should work…</p>
<p dir="auto">Create a virtualenv inside the bundle itself and install Pygments there.</p>
<pre><code>sudo easy_install pip
sudo pip install virtualenv
# in the bundle’s directory
virtualenv env
env/bin/pip install pygments
</code></pre>
<p dir="auto">Then update the script to call <code>env/bin/pygmentize</code>.</p>
<p dir="auto">Or look at how I did it with BeautifulSoup in Quicksilver. I don’t even think I needed <code>virtualenv</code>, but that was a long time ago and I’ve forgotten.</p>
<p dir="auto">Other considerations:</p>
<ul>
<li>You should make sure the bundle that gets pushed out doesn’t include the compiled files. Adding <code>*.pyc</code> to Git’s ignore list should do it.</li>
<li>This means MailMate will always use that copy of Pygments and not the one the user has installed in some other location (like <code>/usr/local</code>). As a result…
<ul>
<li>Custom color schemes from PyPI would have to be installed into the virtualenv, too.</li>
<li>You’ll always be able to include a “known to work” version of Pygments.</li>
</ul></li>
</ul>
<p dir="auto">-- <br>
Rob McBroom<br>
<a href="http://www.skurfer.com/">http://www.skurfer.com/</a></p>
</div>