Files
nixpkgs/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch

21 lines
603 B
Diff

diff --git a/spyder/app/start.py b/spyder/app/start.py
index 3f225a164..10e6017b1 100644
--- a/spyder/app/start.py
+++ b/spyder/app/start.py
@@ -9,15 +9,6 @@
import os
import sys
-# Remove PYTHONPATH paths from sys.path before other imports to protect against
-# shadowed standard libraries.
-if os.environ.get('PYTHONPATH'):
- for path in os.environ['PYTHONPATH'].split(os.pathsep):
- try:
- sys.path.remove(path.rstrip(os.sep))
- except ValueError:
- pass
-
# Remove PYTHONEXECUTABLE. See spyder-ide/spyder#24743
os.environ.pop("PYTHONEXECUTABLE", None)