Skip to content

Commit

Permalink
add vendor to path after packages
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdhung committed Dec 26, 2018
1 parent 707380d commit 0737c9d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions setup/__init__.py
@@ -1,6 +1,5 @@
import os
import platform
import sublime
import subprocess
import sys

Expand Down Expand Up @@ -29,12 +28,12 @@ def _setup_path():
global _ROOT
_ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))

# Determine if python-jinja2 package exists. If so, we need to modify the
# path such that we get precedence.
# Modify the path such that our version of jinja2 gets precedence
packages_path = os.path.dirname(_ROOT)
idx = -1
for i, p in enumerate(sys.path):
if 'python-jinja2' in p:
idx = i
if p == packages_path:
idx = i + 1
break

if idx != -1:
Expand Down

0 comments on commit 0737c9d

Please sign in to comment.