Remove a bit of sys.path hackery.

Previously main.py would reconfigure sys.path during the execution of
the recipe code in order to make `from recipe_engine import ...` work.
This changes it so that all known executions of main.py (namely
recipes.py and the two bundled launcher scripts) just set PYTHONPATH
correctly prior to invoking main.py.

R=fancl, yiwzhang

Bug: 1462728
Change-Id: Ice5a9351a81dcdd46db59afb42f6a5b85049cfa3
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/4673921
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
diff --git a/recipe_engine/main.py b/recipe_engine/main.py
index 93a8590..18da041 100755
--- a/recipe_engine/main.py
+++ b/recipe_engine/main.py
@@ -55,28 +55,12 @@
 _hack_lookup_codecs()
 del _hack_lookup_codecs
 
-# Hack 4; Drop sys.path[0], which is ROOT_DIR/recipe_engine. This prevents user
-# recipe code from doing things like `import util` and getting
-# recipe_engine/util.py.
-#
-# This is needed because main.py lives inside of the recipe_engine folder; when
-# recipes.py invokes this as `python path/to/recipe_engine/main.py`, python puts
-# this directory at the front of sys.path.
-#
-# A better long-term fix would be to move main.py up one level so that the
-# automatically-prepended directory would remove the need for this and the
-# ROOT_DIR bit below.
-sys.path = sys.path[1:]
-
 try:
   import urllib3.contrib.pyopenssl
   urllib3.contrib.pyopenssl.inject_into_urllib3()
 except ImportError:
   pass
 
-ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-sys.path.insert(0, ROOT_DIR)
-
 from recipe_engine.internal import debugger
 
 debugger.engage_debugger()