提交 39673cc9 authored 作者: Frederic's avatar Frederic

code cleanup

上级 c4650372
...@@ -4,7 +4,6 @@ from __future__ import print_function ...@@ -4,7 +4,6 @@ from __future__ import print_function
import atexit import atexit
import cPickle import cPickle
import logging import logging
import operator
import os import os
import re import re
import shutil import shutil
...@@ -25,12 +24,12 @@ except ImportError: ...@@ -25,12 +24,12 @@ except ImportError:
import numpy.distutils # TODO: TensorType should handle this import numpy.distutils # TODO: TensorType should handle this
import theano import theano
from theano.compat import PY3, next, decode, decode_iter from theano.compat import PY3, decode, decode_iter
from theano.compat.six import b, BytesIO, StringIO from theano.compat.six import b, BytesIO, StringIO
from theano.gof.utils import flatten from theano.gof.utils import flatten
from theano.configparser import config from theano.configparser import config
from theano.gof.cc import hash_from_code from theano.gof.cc import hash_from_code
from theano.misc.windows import (subprocess_Popen, call_subprocess_Popen, from theano.misc.windows import (subprocess_Popen,
output_subprocess_Popen) output_subprocess_Popen)
# we will abuse the lockfile mechanism when reading and writing the registry # we will abuse the lockfile mechanism when reading and writing the registry
...@@ -1051,8 +1050,6 @@ class ModuleCache(object): ...@@ -1051,8 +1050,6 @@ class ModuleCache(object):
if module is not None: if module is not None:
return module return module
lock_taken = False
src_code = lnk.get_src_code() src_code = lnk.get_src_code()
# Is the source code already in the cache? # Is the source code already in the cache?
module_hash = get_module_hash(src_code, key) module_hash = get_module_hash(src_code, key)
...@@ -1499,8 +1496,8 @@ def std_lib_dirs_and_libs(): ...@@ -1499,8 +1496,8 @@ def std_lib_dirs_and_libs():
r'EGG-INFO\mingw\usr\x86_64-w64-mingw32\lib')] r'EGG-INFO\mingw\usr\x86_64-w64-mingw32\lib')]
for f, lib in [('libmsvcr90.a', for f, lib in [('libmsvcr90.a',
'mingw 4.5.2 or 4.8.1-2 (newer could work)')]: 'mingw 4.5.2 or 4.8.1-2 (newer could work)')]:
if not any([os.path.exists(os.path.join(libdir, f)) if not any([os.path.exists(os.path.join(tmp_libdir, f))
for libdir in libdirs]): for tmp_libdir in libdirs]):
print(("Your Python version is from Canopy. " + print(("Your Python version is from Canopy. " +
"You need to install the package '" + lib + "You need to install the package '" + lib +
"' from Canopy package manager." "' from Canopy package manager."
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论