depot/third_party/nixpkgs/pkgs/development/python-modules/spyder/dont-clear-pythonpath.patch
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

21 lines
667 B
Diff

diff --git a/spyder/app/start.py b/spyder/app/start.py
index ad9f2b8d0..442b4fc46 100644
--- a/spyder/app/start.py
+++ b/spyder/app/start.py
@@ -6,16 +6,8 @@
# (see spyder/__init__.py for details)
# -----------------------------------------------------------------------------
-# Remove PYTHONPATH paths from sys.path before other imports to protect against
-# shadowed standard libraries.
import os
import sys
-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
# Standard library imports
import ctypes