Thanks for the suggestions. The plugin I wrote for finding xpcshell tests worked because I just manually passed it in to nose; see the bottom of this file:<br><br> <a href="http://hg.mozilla.org/labs/weave/index.cgi/file/389d9ff46d61/scripts/runtests.py">http://hg.mozilla.org/labs/weave/index.cgi/file/389d9ff46d61/scripts/runtests.py</a><br>
<br>- Atul<br><br><div class="gmail_quote">On Fri, Jul 11, 2008 at 11:51 AM, Kumar McMillan <<a href="mailto:kumar.mcmillan@gmail.com">kumar.mcmillan@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, Jul 11, 2008 at 11:35 AM, Atul Varma <<a href="mailto:varmaa@gmail.com">varmaa@gmail.com</a>> wrote:<br>
> <a href="http://hg.mozilla.org/labs/weave/index.cgi/file/389d9ff46d61/scripts/getnose.py" target="_blank">http://hg.mozilla.org/labs/weave/index.cgi/file/389d9ff46d61/scripts/getnose.py</a><br>
><br>
> To use it, one just has to "import getnose" before they "import nose". If<br>
> nose isn't already installed system-wide, the nose package is automatically<br>
> downloaded and untarred in the current directory and the proper directory is<br>
> added to sys.path (thereby obviating any need for admin privileges). Thus<br>
> Weave's testing infrastructure is able to use nose without having to<br>
> explicitly require developers to retrieve it.<br>
><br>
</div><div class="Ih2E3d">> Would this be of use to anyone? Or was there an easier way for me to<br>
> achieve the same end? I'm just curious.<br>
<br>
</div>Atul, that definitely seems useful. Managing dependencies will always<br>
be tricky, IMO, and bootstrapping always feels awkward. Some similar<br>
ways you could do it would be to create a buildout recipe or use Poach<br>
Eggs.<br>
<br>
Buildout: <a href="http://pypi.python.org/pypi/zc.buildout/" target="_blank">http://pypi.python.org/pypi/zc.buildout/</a><br>
I believe you'd want to make a buildout.cfg something like this<br>
<br>
[buildout]<br>
parts = nose<br>
bin-directory = .<br>
<br>
[nose]<br>
recipe = zc.recipe.egg<br>
eggs = nose<br>
<br>
... then I think you will get the script ./nosetests to run. IIRC<br>
buildout has its own automatic bootstrapping mechanism so that you<br>
don't have to have buildout or setuptools installed. I think.<br>
<br>
<br>
Poach Eggs -- I haven't used it myself but if I understand it's a way<br>
to simply add a list of requirements to a file and from that build the<br>
eggs locally. *However* I don't know if it does automatic<br>
bootstrapping for the PoachEggs and setuptools installation<br>
themselves.<br>
<a href="http://www.openplans.org/projects/opencore/poacheggs" target="_blank">http://www.openplans.org/projects/opencore/poacheggs</a><br>
<br>
<br>
As for your approach, it's simple and elegant so that's a plus. Do<br>
plugins still work like this? I imagine they would work as long as<br>
they were easy_install'd since that activates their entry points. If<br>
you wanted to install local plugins without system wide installation<br>
then I don't think adding to sys.path will be enough. You'd have to<br>
use one of the above approaches since they hook into the setuptools<br>
framework.<br>
<font color="#888888"><br>
K<br>
</font></blockquote></div><br>