Skip to content
Snippets Groups Projects
Commit f9e7da2d authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Hack through http://bugs.python.org/issue30167 for python 3.6 and superior (see #15)

parent 6025cc06
No related branches found
No related tags found
No related merge requests found
......@@ -30,8 +30,13 @@ import sys
sys.path[0:0] = [
%%(path)s,
]
if sys.version_info[:2] >= (3, 6): #see: http://bugs.python.org/issue30167
_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...
sys.modules['__main__'].__loader__.__module__ = _hack
import pkg_resources #initializes virtualenvs properly
%%(initialization)s
import %%(module_name)s
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment