浏览代码

site.addsitedir() instead of sys.path.insert().

pull/24/head
Ben Kurtovic 11 年前
父节点
当前提交
230e4f33ef
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      build.py

+ 2
- 1
build.py 查看文件

@@ -9,6 +9,7 @@ import subprocess
page_src = """#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import site
import sys

os.chdir("..")
@@ -17,7 +18,7 @@ if plat.startswith("sunos"):
plat = "solaris"
elif plat.startswith("linux"):
plat = "linux"
sys.path.insert(0, os.path.expanduser("~/.local/" + plat + "/lib/python2.7/site-packages"))
site.addsitedir(os.path.expanduser("~/.local/" + plat + "/lib/python2.7/site-packages"))
sys.path.insert(0, ".")

from mako.template import Template


正在加载...
取消
保存