From 50f6fed6837c6a866f0ff277839776e09aaf9b63 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Wed, 16 Aug 2017 11:15:26 +0100
Subject: [PATCH 05/15] Win32: Ensure Library\bin is in os.environ["PATH"]

---
 Lib/site.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Lib/site.py b/Lib/site.py
index 07ee63e..23e2321 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -529,6 +529,11 @@ def main():
     execsitecustomize()
     if ENABLE_USER_SITE:
         execusercustomize()
+    if sys.platform == 'win32':
+        # Anaconda Distribution hack in-case the environment has not been activated properly.
+        library_bin = r"%s\Library\bin" % (sys.prefix)
+        if library_bin not in os.environ["PATH"]:
+            os.environ["PATH"] = library_bin+";"+os.environ["PATH"]
 
 # Prevent extending of sys.path when python was started with -S and
 # site is imported later.
-- 
2.11.1

