[Python-checkins] benchmarks: Fix some environment variable requirements for Jython and IronPython

brett.cannon python-checkins at python.org
Fri Oct 16 13:29:41 EDT 2015


https://hg.python.org/benchmarks/rev/4539351d314a
changeset:   224:4539351d314a
user:        Brett Cannon <brett at python.org>
date:        Fri Oct 16 10:29:33 2015 -0700
summary:
  Fix some environment variable requirements for Jython and IronPython

files:
  perf.py |  10 +++++++---
  1 files changed, 7 insertions(+), 3 deletions(-)


diff --git a/perf.py b/perf.py
--- a/perf.py
+++ b/perf.py
@@ -969,13 +969,15 @@
     Massaging performed (in this order):
     - Add any variables named in inherit_env.
     - Copy PYTHONPATH to JYTHONPATH to support Jython.
+    - Copy PYTHONPATH to IRONPYTHONPATH to support IronPython.
     - Win32 requires certain env vars to be set.
 
     Args:
         env: optional; environment variables dict. If this is omitted, start
             with an empty environment.
         inherit_env: optional; iterable of strings, each the name of an
-            environment variable to inherit from os.environ.
+            environment variable to inherit from os.environ, for any
+            interpreter as well as for Jython specifically.
 
     Returns:
         A copy of `env`, possibly with modifications.
@@ -987,9 +989,11 @@
         fixed_env[varname] = os.environ[varname]
     if "PYTHONPATH" in fixed_env:
         fixed_env["JYTHONPATH"] = fixed_env["PYTHONPATH"]
+        fixed_env["IRONPYTHONPATH"] = fixed_env["PYTHONPATH"]
     if sys.platform == "win32":
-        # Win32 requires certain environment variables be present
-        for k in ("COMSPEC", "SystemRoot"):
+        # Win32 requires certain environment variables be present,
+        # as does Jython under Windows.
+        for k in ("COMSPEC", "SystemRoot", "TEMP", "PATH"):
             if k in os.environ and k not in fixed_env:
                 fixed_env[k] = os.environ[k]
     # Make hashing deterministic (this may make some benchmarks more

-- 
Repository URL: https://hg.python.org/benchmarks


More information about the Python-checkins mailing list