Use the entry_points/console_scripts feature of setup.py
to make theano scripts installed when running pip install.
These step are done to fix issue #5308. The bin folder
containing the scripts is now importable from Python,
with each script embedding its code into a main() function
specified as the entry point of the script in `setup.py`.
We also detect a Windows-specific error: the cache folder
cannot be deleted because it contains shared libraries that are
always loaded at theano importation and stay opened on Windows,
which forbide the deletion of the shared library files in the cache.
The workaround chosen is to unset theano config flag `cxx` only
on Windows platform and only in theano-cache script. Doing that,
Theano will not try to compile any C code, and will also not try
to load compiled C codes that are in the cache, allowing these files
to be deleted.
To ensure this workaround does work, we also ensure that lazylinker
module will be also ignored from cache when `cxx` is unset. Previously,
if cxx was unset, Theano would not compile lazylinker but would look
for an already compiled version of this module in the cache.
正在显示
bin/__init__.py
0 → 100644
bin/theano-test
deleted
100755 → 0
bin/theano-cache
→
bin/theano_cache.py
100755 → 100644
bin/theano-nose
→
bin/theano_nose.py
100755 → 100644
bin/theano_test.py
0 → 100644
请
注册
或者
登录
后发表评论