[Python-checkins] r69107 - in python/branches/release26-maint: Lib/distutils/tests/test_sdist.py

tarek.ziade python-checkins at python.org
Fri Jan 30 00:51:54 CET 2009


Author: tarek.ziade
Date: Fri Jan 30 00:51:53 2009
New Revision: 69107
Log:
Merged revisions 69106 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r69106 | tarek.ziade | 2009年01月30日 00:49:17 +0100 (2009年1月30日) | 1 line
 
 fixed test_make_distribution so it runs on any platform, as long as tar an gzip are available
........
Modified:
 python/branches/release26-maint/ (props changed)
 python/branches/release26-maint/Lib/distutils/tests/test_sdist.py
Modified: python/branches/release26-maint/Lib/distutils/tests/test_sdist.py
==============================================================================
--- python/branches/release26-maint/Lib/distutils/tests/test_sdist.py	(original)
+++ python/branches/release26-maint/Lib/distutils/tests/test_sdist.py	Fri Jan 30 00:51:53 2009
@@ -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')
@@ -111,15 +111,12 @@
 
 def test_make_distribution(self):
 
- self._init_tmp_pkg()
+ # check if tar and gzip are installed
+ if (find_executable('tar') is None or
+ find_executable('gzip') is None):
+ return
 
- # check if tar is installed under win32
- if sys.platform == 'win32':
- try:
- spawn('tar --help')
- except DistutilsExecError:
- # let's return, no need to go further
- return
+ self._init_tmp_pkg()
 
 # now building a sdist
 dist = Distribution()


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /