Eclipse Pydev で Google App Engine
Update: unknown
参議院の押しボタン投票を集計する Google App Engine のアプリ http://code.google.com/p/sangiin-votes/ を作り始めました。そのための Eclipse のプロジェクトの作成の手順です。使用している Eclipse のプラグインなどについては Eclipse で Python を見てください。
アプリケーションの ID は sangiin-votes です。
新しいプロジェクトを作成します。"Pydev Google App Engine Project" を選択します。

プロジェクト名と Python のバージョン、パスを設定します。プロジェクト名はアプリケーション ID と同じにしました。私の MacBook の場合、/usr/bin/python は 2.6.1 なので、 /usr/bin/python2.5 を指定しました。

Google App Engine SDK のパスを設定します。 Mac OS X の場合は
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
のようなわかりにくい場所になります。

アプリケーション ID と、サンプルコードの有無を指定します。

app.yaml と helloworld.py のサンプルが生成されました。

アプリケーションをデプロイするスクリプト、開発用の実行環境を起動するスクリプト(データストアをクリアするものとしないもの)を作成します。
sangiin-votes_deploy.sh
/usr/bin/python2.5 ¥
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/appcfg.py ¥
--email=xxxxxxxxxxxxxxxxxxxx@gmail.com ¥
update ¥
/Users/michinobu/workspace/sangiin-votes/src
sangiin-votes_start_cleare.sh
/usr/bin/python2.5 ¥
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py ¥
--admin_console_server= ¥
--port=8080 ¥
--use_sqlite ¥
--clear_datastore ¥
/Users/michinobu/workspace/sangiin-votes/src
sangiin-votes_start.sh
/usr/bin/python2.5 ¥
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py ¥
--admin_console_server= ¥
--port=8080 ¥
--use_sqlite ¥
/Users/michinobu/workspace/sangiin-votes/src
sangiin-votes_start_cleare.sh を実行して、ブラウザで確認します。
アプリケーション http://localhost:8080/

管理機能 http://localhost:8080/_ah/admin/

とりあえず helloworld.py のファイル名を index.py に変更し、 app.yaml の該当箇所も書き換えて、リポジトリに登録します。リポジトリの場所は http://sangiin-votes.googlecode.com/svn/trunk/ です。Google Project Hosting の場合、http が読み取り専用、 https が読み書き可能です。パースペクティブを "SVN Repository Exploring perspective" に変更し、新しいリポジトリ・ロケーションを追加します。

Pydev のパースペクティブに戻り、プロジェクトを共有します。

リポジトリの種類は SVN を選択します。

登録済みのロケーションを選択します。

プロジェクトのロケーションが https://sangiin-votes.googlecode.com/svn/trunk/sangiin-votes になるように設定します。

コメントは適当に。自動生成されたものでいいと思います。

リソースのコミットのコメントは適当に。

"SVN Repository Exploring perspective" に戻って、表示を更新すると、登録した結果を見ることができます。

みちのぶのねぐら