| Issue 26: | Make setuptools optional | |
| 3 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
Setuptools, great as it is, is not used by or useful for everyone. It shouldn't be a requirement for nose. To make it optional, a few steps must be followed: 1. Allow setup.py to fall through to using distutils if ez_setup fails and setuptools can't be found 2. Provide another means for loading plugins (perhaps setting __PATH__ in nose.plugins, as twisted does for their plugins) 3. Wrap all usage of setuptools & pkg_resources so that nose doesn't fail when they aren't available, but instead uses alternate methods or disables features |
||||||||||||||
,
Jun 28, 2007
When in development mode, it's clearly useful to be able to run multiple versions of node, and multiple versions of the plugins. For instance, I'll soon investigate how to port my plugins from 0.9 version to 0.10 of nose. I know it will be a pain. If nose itself could be run just by being in the python path (no installation in site-packages), that would help. Then I would just have to change the python path to switch my version of nose. Same thing for the plugins, actually. |
|||||||||||||||
,
Feb 20, 2008
you might want to look into virturalenv which allows you to have multiple environments running off the same python. That way you could isolate your package versions to test your software. It's an easy_installable package. |
|||||||||||||||
,
Sep 18, 2008
I wanted this as well; specifically the ability to load plugins from sys.path without having to install them.
The attached patch does this - at least partly.
It defines a new plugin manager, PythonPathPluginManager, which on initialization takes a list of
(module_name, plugin_name) pairs, and loads the named plugins from the named modules, if said modules
are on sys.path.
It also adds an argument to TestProgram, plugin_modules, which is expected to be that list. So you can invoke
nose from a script like:
nose.core.TestProgram(argv=["", "-v", "--with-django"], plugin_modules=[('nosedjango',
'NoseDjango')]).success
as long as nosedjango.py is on your sys.path somewhere, without having installed it through setup.py
I'm not sure this is the ideal way to do it, I can't work out how to get TestProgram to activate plugins from a
list of plugins instead of argv. But it does work for now.
(patch is against 0.10.3)
|
|||||||||||||||
|
|
|||||||||||||||