aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-02-27 19:07:02 -0800
committerChad Austin <chad@imvu.com>2013-03-04 19:35:18 -0800
commitcc0d959ebeb0624d7e8f3af496c170340afb8e55 (patch)
treee47dd030d21fe970b64478faa5792a90d99feb8b /tools/shared.py
parent4bde971a1f51eaa9c6da2e54a295ff04183cbab5 (diff)
fix some test failures
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/shared.py b/tools/shared.py
index ff9f9f9b..06d530b8 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1,7 +1,7 @@
import shutil, time, os, sys, json, tempfile, copy, shlex, atexit, subprocess, hashlib, cPickle, zlib, re
from subprocess import Popen, PIPE, STDOUT
from tempfile import mkstemp
-from . import jsrun, cache, tempfiles
+import jsrun, cache, tempfiles
def listify(x):
if type(x) is not list: return [x]
@@ -307,13 +307,13 @@ class Configuration:
print >> sys.stderr, 'TEMP_DIR not defined in ~/.emscripten, using /tmp'
self.TEMP_DIR = '/tmp'
- CANONICAL_TEMP_DIR = os.path.join(self.TEMP_DIR, 'emscripten_temp')
+ self.CANONICAL_TEMP_DIR = os.path.join(self.TEMP_DIR, 'emscripten_temp')
if self.DEBUG:
try:
- self.EMSCRIPTEN_TEMP_DIR = CANONICAL_TEMP_DIR
- if not os.path.exists(EMSCRIPTEN_TEMP_DIR):
- os.makedirs(EMSCRIPTEN_TEMP_DIR)
+ self.EMSCRIPTEN_TEMP_DIR = self.CANONICAL_TEMP_DIR
+ if not os.path.exists(self.EMSCRIPTEN_TEMP_DIR):
+ os.makedirs(self.EMSCRIPTEN_TEMP_DIR)
except Exception, e:
print >> sys.stderr, e, 'Could not create canonical temp dir. Check definition of TEMP_DIR in ~/.emscripten'
@@ -330,6 +330,7 @@ configuration = Configuration(environ=os.environ)
DEBUG = configuration.DEBUG
EMSCRIPTEN_TEMP_DIR = configuration.EMSCRIPTEN_TEMP_DIR
DEBUG_CACHE = configuration.DEBUG_CACHE
+CANONICAL_TEMP_DIR = configuration.CANONICAL_TEMP_DIR
if not EMSCRIPTEN_TEMP_DIR:
EMSCRIPTEN_TEMP_DIR = tempfile.mkdtemp(prefix='emscripten_temp_', dir=configuration.TEMP_DIR)
@@ -430,7 +431,7 @@ if not WINDOWS:
pass
# Temp file utilities
-from .tempfiles import try_delete
+from tempfiles import try_delete
# Utilities