Greetings, TurboGears Devs, sorry for the cross post; I did not send the first message to the right list. As you probably know, setuptools does not do a very good job at installing dependencies before running your tests. This is a problem for people building a new virtual environment because that forces them to install several packages by hand before the tests will run with very little guidance on which package should be installed.
One way to resolve that would be to have an external command that would install the dependencies based on the meta information already in setup.py but not used by setuptools for some reason. The drawback of that is that it touches the root of the package but I think that it's worth it. You can find a proof of concept attached; the final version would include adequate documentation. It is used like the following: cd tg-dev python setup.py develop ./scripts/install-test-deps.py cd ../tgdevtools python setup.py develop cd - nosetests What do you guys think of that option? -- Yannick Gingras http://ygingras.net http://confoo.ca -- track coordinator http://montrealpython.org -- lead organizer
quick fix for installation of test dependencies
diff -r f429027babe0 scripts/install-test-deps.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/install-test-deps.py Mon Feb 22 00:38:25 2010 -0500
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+import os
+from subprocess import call
+
+here = os.path.abspath(os.path.dirname(__file__))
+execfile(os.path.join(here, '..', 'tg', 'release.py'))
+
+def main():
+ call(['easy_install'] + test_requirements)
+
+if __name__ == '__main__':
+ main()
diff -r f429027babe0 setup.py
--- a/setup.py Tue Feb 09 15:41:21 2010 -0700
+++ b/setup.py Mon Feb 22 00:38:25 2010 -0500
@@ -9,19 +9,6 @@
use_setuptools()
from setuptools import find_packages, setup
-test_requirements = ['coverage',
- 'nose',
- 'TurboKid >= 1.0.4',
- 'zope.sqlalchemy >= 0.4',
- 'jinja2',
- 'chameleon.genshi',
- 'simplegeneric',
- 'repoze.what >= 1.0.5',
- 'repoze.what-quickstart',
- 'repoze.who-testutil >= 1.0rc1',
- 'wsgiref',
- 'tw.forms',
- ]
setup(
name='TurboGears2',
diff -r f429027babe0 tg/release.py
--- a/tg/release.py Tue Feb 09 15:41:21 2010 -0700
+++ b/tg/release.py Mon Feb 22 00:38:25 2010 -0500
@@ -29,3 +29,18 @@
copyright = """Copyright 2005-2009 Kevin Dangoor,
Alberto Valverde, Mark Ramm, Christopher Perkins and contributors"""
license = "MIT"
+test_requirements = ['coverage',
+ 'nose',
+ 'TurboKid >= 1.0.4',
+ 'zope.sqlalchemy >= 0.4',
+ 'jinja2',
+ 'chameleon.genshi',
+ 'simplegeneric',
+ 'repoze.what >= 1.0.5',
+ 'repoze.what-quickstart',
+ 'repoze.who-testutil >= 1.0rc1',
+ 'wsgiref',
+ 'tw.forms',
+ 'turbocheetah',
+ 'turbojson',
+ ]
signature.asc
Description: This is a digitally signed message part.
