Description redacted.
--
PiperOrigin-RevId: 144739068
MOS_MIGRATED_REVID=144739068
diff --git a/src/main/java/com/google/devtools/build/lib/actions/BaseSpawn.java b/src/main/java/com/google/devtools/build/lib/actions/BaseSpawn.java
index a7723f7..dd2d5de 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/BaseSpawn.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/BaseSpawn.java
@@ -218,17 +218,15 @@
     PathFragment runfilesRoot = getRunfilesRoot();
     if (runfilesRoot == null
         || (environment.containsKey("JAVA_RUNFILES")
-            && environment.containsKey("PYTHON_RUNFILES")
-            && environment.containsKey("RUNFILES_DIR"))) {
+            && environment.containsKey("PYTHON_RUNFILES"))) {
       return environment;
     } else {
       ImmutableMap.Builder<String, String> env = ImmutableMap.builder();
       env.putAll(environment);
-      // TODO(bazel-team): Remove JAVA_RUNFILES and PYTHON_RUNFILES.
+      // TODO(bazel-team): Unify these into a single env variable.
       String runfilesRootString = runfilesRoot.getPathString();
       env.put("JAVA_RUNFILES", runfilesRootString);
       env.put("PYTHON_RUNFILES", runfilesRootString);
-      env.put("RUNFILES_DIR", runfilesRootString);
       return env.build();
     }
   }
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt
index 55f0e7e..04316fe 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt
@@ -105,7 +105,6 @@
     python_path += separator + old_python_path
 
   new_env['PYTHONPATH'] = python_path
-  new_env['RUNFILES_DIR'] = module_space
 
   # Now look for my main python source file.
   # The magic string percent-main-percent is replaced with the filename of the
diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
index b444544..9b2e1d3 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
@@ -248,7 +248,6 @@
     String testSrcDir = runfilesDir.relativeTo(execRoot).getPathString();
     env.put("JAVA_RUNFILES", testSrcDir);
     env.put("PYTHON_RUNFILES", testSrcDir);
-    env.put("RUNFILES_DIR", testSrcDir);
     env.put("TEST_SRCDIR", testSrcDir);
     env.put("TEST_TMPDIR", tmpDirString);
     env.put("TEST_WORKSPACE", action.getRunfilesPrefix());