Merge from 3.2

This commit is contained in:
Antoine Pitrou 2011-04-16 18:55:16 +02:00
commit a4eb194ea6
2 changed files with 7 additions and 1 deletions

View file

@ -170,6 +170,7 @@ import re
import io
import sys
import time
import errno
import traceback
import warnings
import unittest
@ -1569,8 +1570,11 @@ def _make_temp_dir_for_build(TEMPDIR):
if sysconfig.is_python_build():
TEMPDIR = os.path.join(sysconfig.get_config_var('srcdir'), 'build')
TEMPDIR = os.path.abspath(TEMPDIR)
if not os.path.exists(TEMPDIR):
try:
os.mkdir(TEMPDIR)
except OSError as e:
if e.errno != errno.EEXIST:
raise
# Define a writable temp dir that will be used as cwd while running
# the tests. The name of the dir includes the pid to allow parallel