Skip to content

Instantly share code, notes, and snippets.

@svrist
Created February 7, 2017 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save svrist/f77760996669475d922d57cc9e77c390 to your computer and use it in GitHub Desktop.
Save svrist/f77760996669475d922d57cc9e77c390 to your computer and use it in GitHub Desktop.
Mangle sys.path to include lambda zipped vendored python dependencies
import os
import sys
if 'LAMBDA_TASK_ROOT' in os.environ:
here = os.path.dirname(__file__)
vendored = os.path.join(here, 'vendored')
if os.path.isdir(vendored):
sys.path.append(vendored)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment