commit:     167eda54ae504583dab534522a691aa229c68532
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 14 21:27:35 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 14 21:31:09 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=167eda54

SimpleRepomanTestCase: remove broken PYTHONPATH setting (bug 637460)

Since PORTAGE_PYM_PATH typically refers to the global site-packages
directory, using it to set PYTHONPATH is unhelpful. The code
involving .repoman_not_installed already overrides sys.path when
necessary.

Bug: https://bugs.gentoo.org/637460

 repoman/pym/repoman/tests/simple/test_simple.py | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/repoman/pym/repoman/tests/simple/test_simple.py 
b/repoman/pym/repoman/tests/simple/test_simple.py
index 114656eac..a24e0d5a3 100644
--- a/repoman/pym/repoman/tests/simple/test_simple.py
+++ b/repoman/pym/repoman/tests/simple/test_simple.py
@@ -8,7 +8,6 @@ import time
 from repoman._portage import portage
 from portage import os
 from portage import _unicode_decode
-from portage.const import PORTAGE_BASE_PATH, PORTAGE_PYM_PATH
 from portage.process import find_binary
 from portage.tests.resolver.ResolverPlayground import ResolverPlayground
 from portage.util import ensure_dirs
@@ -204,19 +203,6 @@ class SimpleRepomanTestCase(TestCase):
                        ("dev-libs/A", repoman_cmd + ("commit", "-m", "bump to 
version 4")),
                )
 
-               pythonpath =  os.environ.get("PYTHONPATH")
-               if pythonpath is not None and not pythonpath.strip():
-                       pythonpath = None
-               if pythonpath is not None and \
-                       pythonpath.split(":")[0] == PORTAGE_PYM_PATH:
-                       pass
-               else:
-                       if pythonpath is None:
-                               pythonpath = ""
-                       else:
-                               pythonpath = ":" + pythonpath
-                       pythonpath = PORTAGE_PYM_PATH + pythonpath
-
                env = {
                        "PORTAGE_OVERRIDE_EPREFIX" : eprefix,
                        "DISTDIR" : distdir,
@@ -228,7 +214,6 @@ class SimpleRepomanTestCase(TestCase):
                        "PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"],
                        "PORTAGE_REPOSITORIES" : 
settings.repositories.config_string(),
                        "PYTHONDONTWRITEBYTECODE" : 
os.environ.get("PYTHONDONTWRITEBYTECODE", ""),
-                       "PYTHONPATH" : pythonpath,
                }
 
                if os.environ.get("SANDBOX_ON") == "1":

Reply via email to