0
對於App Engine項目,我在zc.buildout
上遇到了一些困難。我想建立一個bin/
生成一個python解釋器,它包含path
所需的調整,它基於app.yaml
中指定的庫版本。這樣,只要有命令行腳本或交互式shell工作,我就可以使用這個生成的python腳本。如何使用包含我的初始化代碼的zc.buildout生成自定義python解釋器?
這是我想插入的代碼:
import dev_appserver
dev_appserver.fix_sys_path()
這裏是我的buildout.cfg:
[buildout]
parts =
python
gae_sdk
[gae_sdk]
# Downloads and extracts the App Engine SDK.
recipe = appfy.recipe.gae:sdk
url = http://googleappengine.googlecode.com/files/google_appengine_1.8.9.zip
destination = ${buildout:parts-directory}
hash-name = false
clear-destination = true
[python]
recipe = zc.recipe.egg
interpreter = python
initialization =
import dev_appserver
dev_appserver.fix_sys_path()
extra-paths =
${gae_sdk:destination}/google_appengine
${buildout:directory}/app