Index: Lib/distutils/tests/test_sdist.py =================================================================== --- Lib/distutils/tests/test_sdist.py (revision 69030) +++ Lib/distutils/tests/test_sdist.py (working copy) @@ -10,7 +10,7 @@ from distutils.core import Distribution from distutils.tests.test_config import PyPIRCCommandTestCase from distutils.errors import DistutilsExecError -from distutils.spawn import spawn +from distutils.spawn import find_executable CURDIR = os.path.dirname(__file__) TEMP_PKG = join(CURDIR, 'temppkg') @@ -113,13 +113,12 @@ self._init_tmp_pkg() - # check if tar is installed under win32 + # check if tar and gzip are installed under win32 if sys.platform == 'win32': - try: - spawn('tar --help') - except DistutilsExecError: - # let's return, no need to go further - return + for executable in ['tar', 'gzip']: + if find_executable(executable) is None: + # let's return, no need to go further + return # now building a sdist dist = Distribution()