Pasterのtemplateを作ってみた

Pasterのtemplateを作ってみた。
http://github.com/dann/python-simple_package_template

pasterのtemplateの作り方は、以下のページに。
http://pythonpaste.org/script/developer.html#id6

templateを作るときのポイントは、以下の通り。

  • entry_pointsに、[paste.paster_create_template] を設定すること
    • framework = framework.templates:FrameworkTemplate
  • FrameworkTemplateは、paste.script.templates.Templateを継承する事。
  • templateの置換ルール
    • fileやディレクトリ名は、+var_name+と書く事で変数名で置換される
    • ファイル内の変数は、${repr(project)}と書く事で置換される
    • _tmplというファイル名のファイルは、templateの中身の変数が置換され、paster createで生成したときにとしてコピーされる