Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
06526e7c
Commit
06526e7c
authored
11 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
pip-micropython: Apply more workarounds for setuptools, pip, etc misfeatures.
parent
82c7b1b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/pip-micropython
+15
-0
15 additions, 0 deletions
tools/pip-micropython
with
15 additions
and
0 deletions
tools/pip-micropython
+
15
−
0
View file @
06526e7c
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment