提交 705fd905 authored 作者: John Salvatier's avatar John Salvatier

moved import cutils to a more logical spot

上级 3db5f8dd
...@@ -3,6 +3,7 @@ import os, sys ...@@ -3,6 +3,7 @@ import os, sys
from theano.compat import PY3 from theano.compat import PY3
from theano.gof.compilelock import get_lock, release_lock from theano.gof.compilelock import get_lock, release_lock
from theano import config from theano import config
import cmodule
# TODO These two lines may be removed in the future, when we are 100% sure # TODO These two lines may be removed in the future, when we are 100% sure
# noone has an old cutils_ext.so lying around anymore. # noone has an old cutils_ext.so lying around anymore.
...@@ -243,7 +244,6 @@ fail: ...@@ -243,7 +244,6 @@ fail:
""" """
import cmodule
loc = os.path.join(config.compiledir, 'cutils_ext') loc = os.path.join(config.compiledir, 'cutils_ext')
if not os.path.exists(loc): if not os.path.exists(loc):
os.mkdir(loc) os.mkdir(loc)
...@@ -269,8 +269,6 @@ try: ...@@ -269,8 +269,6 @@ try:
try: try:
from cutils_ext.cutils_ext import * from cutils_ext.cutils_ext import *
except ImportError: except ImportError:
import cmodule
get_lock() get_lock()
# Ensure no-one else is currently modifying the content of the compilation # Ensure no-one else is currently modifying the content of the compilation
# directory. This is important to prevent multiple processes from trying to # directory. This is important to prevent multiple processes from trying to
...@@ -282,7 +280,6 @@ try: ...@@ -282,7 +280,6 @@ try:
# and when we receive the lock # and when we receive the lock
from cutils_ext.cutils_ext import * from cutils_ext.cutils_ext import *
except ImportError: except ImportError:
import cmodule
compile_cutils() compile_cutils()
from cutils_ext.cutils_ext import * from cutils_ext.cutils_ext import *
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论