← Back to team overview

divmod-dev team mailing list archive

[Merge] lp:~divmod-dev/divmod.org/829865-PYTHONPATH-handling into lp:divmod.org

 

Tristan Seligmann has proposed merging lp:~divmod-dev/divmod.org/829865-PYTHONPATH-handling into lp:divmod.org.

Requested reviews:
  Divmod-dev (divmod-dev)
Related bugs:
  Bug #829865 in Divmod Axiom: "Get rid of PYTHONPATH mangling"
  https://bugs.launchpad.net/divmod-axiom/+bug/829865

For more details, see:
https://code.launchpad.net/~divmod-dev/divmod.org/829865-PYTHONPATH-handling/+merge/72274
-- 
https://code.launchpad.net/~divmod-dev/divmod.org/829865-PYTHONPATH-handling/+merge/72274
Your team Divmod-dev is requested to review the proposed merge of lp:~divmod-dev/divmod.org/829865-PYTHONPATH-handling into lp:divmod.org.
=== modified file 'Axiom/axiom/batch.py'
--- Axiom/axiom/batch.py	2009-07-07 20:35:43 +0000
+++ Axiom/axiom/batch.py	2011-08-20 01:52:23 +0000
@@ -648,7 +648,6 @@
     def _startProcess(self):
         executable = sys.executable
         env = os.environ
-        env['PYTHONPATH'] = os.pathsep.join(sys.path)
 
         twistdBinaries = procutils.which("twistd2.4") + procutils.which("twistd")
         if not twistdBinaries:

=== modified file 'Axiom/axiom/test/test_item.py'
--- Axiom/axiom/test/test_item.py	2008-11-04 17:17:19 +0000
+++ Axiom/axiom/test/test_item.py	2011-08-20 01:52:23 +0000
@@ -306,12 +306,10 @@
         st.close()
 
         e = os.environ.copy()
-        # Kind of a heuristic - hmmm
-        e['PYTHONPATH'] = os.pathsep.join(sys.path) # os.pathsep.join([dir for dir in sys.path if not dir.startswith(sys.prefix)])
         d = defer.Deferred()
         p = ProcessOutputCollector(d)
         try:
-            reactor.spawnProcess(p, sys.executable, ["python", '-Wignore', itemtestmain.__file__.rstrip('co'), storePath.path, str(itemID)], e)
+            reactor.spawnProcess(p, sys.executable, [sys.executable, '-Wignore', itemtestmain.__file__.rstrip('co'), storePath.path, str(itemID)], e)
         except NotImplementedError:
             raise unittest.SkipTest("Implement processes here")
 


Follow ups