diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index 1db0bc81126a14031e9a2bef83a75dc44796fb0f..750db6c53c36cf22e1e4311fc33eb7243b7e264b 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -18,7 +18,7 @@ class PythonDependency < Requirement
     build? || system_python?
   end
 
-  def modify_build_environment
+  env do
     if system_python?
       if python_binary == "python"
         version = python_short_version