Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
eb936189
Commit
eb936189
authored
Apr 13, 2014
by
Damien George
Browse files
Merge branch 'master' of github.com:micropython/micropython
parents
87210876
06526e7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/pip-micropython
View file @
eb936189
...
@@ -30,6 +30,21 @@ fi
...
@@ -30,6 +30,21 @@ fi
# installed if it's already installed for main python distribution.
# installed if it's already installed for main python distribution.
if
[
!
-d
/tmp/pip-micropy-venv
]
;
then
if
[
!
-d
/tmp/pip-micropy-venv
]
;
then
virtualenv
--no-site-packages
/tmp/pip-micropy-venv
virtualenv
--no-site-packages
/tmp/pip-micropy-venv
# distutils, setuptools, pip are buggy and allow target packages affect
# their execution environment. For example, if distribution they install
# has re.py, they will import that instead of system re. So, we need
# to remove current dir from sys.path, but that appear to be quite uneasy
# with CPython, so we hook __import__ and exterminate it persistently.
# See also https://bitbucket.org/pypa/setuptools/issue/187/
cat
>
$(
ls
-1d
/tmp/pip-micropy-venv/lib/python
*
/
)
/sitecustomize.py
<<
EOF
import sys
import __builtin__
old_imp = __import__
def new_imp(*a, **kw):
if not sys.path[0]: sys.path.pop(0)
return old_imp(*a, **kw)
__builtin__.__import__ = new_imp
EOF
fi
fi
.
/tmp/pip-micropy-venv/bin/activate
.
/tmp/pip-micropy-venv/bin/activate
...
...
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