From 6a6a261fa50522d77fba6d6345fb71ba9f00c311 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 6 May 2010 18:10:32 +0200 Subject: make sure all tests passes on all python versions fixes #149 --HG-- branch : distribute extra : rebase_source : 6288f4fcf65083b9d4ffb0ea8b35af44e699b4d5 --- setuptools/command/install_scripts.py | 4 ++-- setuptools/command/test.py | 6 +++++- setuptools/command/upload_docs.py | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index ac797883..6ce1b993 100755 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -12,8 +12,8 @@ class install_scripts(_install_scripts): self.no_ep = False def run(self): - from setuptools.command.easy_install import (get_script_args, - sys_executable) + from setuptools.command.easy_install import get_script_args + from setuptools.command.easy_install import sys_executable self.run_command("egg_info") if self.distribution.scripts: diff --git a/setuptools/command/test.py b/setuptools/command/test.py index b7aef969..0399f5bf 100644 --- a/setuptools/command/test.py +++ b/setuptools/command/test.py @@ -31,7 +31,11 @@ class ScanningLoader(TestLoader): submodule = module.__name__+'.'+file else: continue - tests.append(self.loadTestsFromName(submodule)) + try: + tests.append(self.loadTestsFromName(submodule)) + except Exception, e: + import pdb; pdb.set_trace() + self.loadTestsFromName(submodule) if len(tests)!=1: return self.suiteClass(tests) diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index ea2bad7e..213f7b58 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -16,7 +16,11 @@ import sys from distutils import log from distutils.errors import DistutilsOptionError -from distutils.command.upload import upload + +try: + from distutils.command.upload import upload +except ImportError: + from setuptools.command.upload import upload _IS_PYTHON3 = sys.version > '3' -- cgit v1.2.1