Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.buildout
Commits
3a0997dd
Commit
3a0997dd
authored
Feb 19, 2018
by
Amir MOHAMMADI
Browse files
Merge branch 'issue-24' into 'master'
Try a fix for issue 24 Closes
#24
See merge request
!27
parents
c8fb8711
d086e595
Pipeline
#16901
passed with stages
in 2 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/buildout/script.py
View file @
3a0997dd
...
@@ -30,12 +30,17 @@ import sys
...
@@ -30,12 +30,17 @@ import sys
sys.path[0:0] = [
sys.path[0:0] = [
%%(path)s,
%%(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__)
_hack = str(sys.modules['__main__'].__loader__.__module__)
sys.modules['__main__'].__loader__.__module__ += '_'
sys.modules['__main__'].__loader__.__module__ += '_'
import site #initializes site properly
import site #initializes site properly
site.main() #this is required for python>=3.4
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
sys.modules['__main__'].__loader__.__module__ = _hack
import pkg_resources #initializes virtualenvs properly
import pkg_resources #initializes virtualenvs properly
%%(initialization)s
%%(initialization)s
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment