Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'sys.path' must not include foreign paths #42

Closed
tmontes opened this issue Sep 16, 2020 · 1 comment
Closed

'sys.path' must not include foreign paths #42

tmontes opened this issue Sep 16, 2020 · 1 comment
Labels
bug Something isn't working @ python-runtime
Milestone

Comments

@tmontes
Copy link
Member

tmontes commented Sep 16, 2020

CURRENT macOS FACT:

  • Packaged Mu with Python 3.7.
  • Checked the value of the bundled Python environment's sys.path with:
$ ./build/pup/mu-editor.app/Contents/Resources/Python/bin/python3 -q
>>> import sys
>>> print(*map(repr, sys.path), sep='\n')
''
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python37.zip'
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python3.7'
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python3.7/lib-dynload'
'${HOME}/.local/lib/python3.7/site-packages'
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python3.7/site-packages'
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python3.7/site-packages/setuptools-49.6.0-py3.7.egg'
'${PWD}/build/pup/mu-editor.app/Contents/Resources/Python/lib/python3.7/site-packages/pip-20.2.2-py3.7.egg'
>>> 

NEEDS CHANGE:

  • Two entries should be eliminated from sys.path:
    • The '' empty one, corresponding to the current working directory.
    • The ${HOME}/.local/lib/python3.7/site-packages which, I suppose, holds pip --user installed packages.

WONDERING:

  • What kind of sys.path values are we getting on Windows?
  • What about Python 3.8 variations?

RELATED:

@tmontes tmontes added bug Something isn't working @ python-runtime labels Sep 16, 2020
@tmontes tmontes added this to the LATER milestone Sep 16, 2020
@tmontes tmontes changed the title Ensure 'sys.path' does not include foreign paths 'sys.path' must not include foreign paths Apr 19, 2021
@tmontes tmontes modified the milestones: LATER, 1.0.0a15 Mar 21, 2022
@tmontes
Copy link
Member Author

tmontes commented Mar 21, 2022

@tmontes tmontes closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @ python-runtime
Projects
None yet
Development

No branches or pull requests

1 participant