Skip to content

Commit 50b80e2

Browse files
committed
Pass "tests" as a package when we are running tests, so it gets some 2to3 love
1 parent d90ab30 commit 50b80e2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88

99
kwargs = {}
1010

11+
packages = ['pyroutes', 'pyroutes.http', 'pyroutes.template', 'pyroutes.contrib', 'pyroutes.middleware']
12+
1113
try:
1214
import setuptools
1315
kwargs['use_2to3'] = True
14-
kwargs['test_suite'] = 'tests'
16+
if len(sys.argv) > 1 and sys.argv[1] == 'test':
17+
packages.append('tests')
18+
kwargs['test_suite'] = 'tests'
1519
except ImportError:
1620
pass
1721

@@ -28,7 +32,7 @@
2832
long_description = long_description,
2933
url = 'http://github.com/pyroutes/pyroutes',
3034
package_data = {'pyroutes': ['default_templates/*.xml', 'default_templates/fileserver/*.xml']},
31-
packages = ['pyroutes', 'pyroutes.http', 'pyroutes.template', 'pyroutes.contrib', 'pyroutes.middleware'],
35+
packages = packages,
3236
requires = ['wsgiref'],
3337
scripts = ['bin/pyroutes-admin.py'],
3438
classifiers = [

0 commit comments

Comments
 (0)