Commit d086e595 authored by André Anjos's avatar André Anjos 💬
Browse files

Try a fix for issue 24

parent b6678cdc
Pipeline #16840 passed with stage
in 2 minutes and 24 seconds
......@@ -30,12 +30,17 @@ import sys
sys.path[0:0] = [
%%(path)s,
]
if sys.version_info[:2] >= (3, 6): #see: http://bugs.python.org/issue30167
#see: http://bugs.python.org/issue30167
if sys.version_info[:2] >= (3, 6) and \
sys.modules['__main__'].__loader__ is not None:
_hack = str(sys.modules['__main__'].__loader__.__module__)
sys.modules['__main__'].__loader__.__module__ += '_'
import site #initializes site properly
site.main() #this is required for python>=3.4
if sys.version_info[:2] >= (3, 6): #restore original value just in case...
if sys.version_info[:2] >= (3, 6) and \
sys.modules['__main__'].__loader__ is not None:
#restores original value
sys.modules['__main__'].__loader__.__module__ = _hack
import pkg_resources #initializes virtualenvs properly
%%(initialization)s
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment