LoginSignup
7
8

More than 5 years have passed since last update.

Plone 5 の開発用環境を作る

Last updated at Posted at 2014-08-20

結論

結論が最後にあると、試す時に途中で挫けてしまうという指摘を受けたので、最初に結論を持ってきます。

Ploneの最新版をgithubなどから取得して、さらに日本語の翻訳をやりたい場合は以下を使う。

$ virtualenv plone5_dev
$ cd plone5_dev/
$ source bin/activate
$ git clone git@github.com:plonejp/buildout.coredev.git
$ cd buildout.coredev
$ git checkout -t origin/5.0-ja
$ python bootstrap.py
$ bin/buildout

前提条件

  • Python 2.7 及び virtualenv がインストール済み
  • gitがインストール済み

環境構築

Ploneのインストール

注意 日本語翻訳に対応させる場合、最下部に書いた方法を使って下さい。

$ virtualenv plone5_dev
$ cd plone5_dev/
$ source bin/activate
$ git clone git@github.com:plone/buildout.coredev.git
$ cd buildout.coredev
$ git checkout -t origin/5.0
$ python bootstrap.py
$ bin/buildout

時々、pypiやgithubからダウンロードできずエラーとなる。何度か buildoutコマンドを実行し再取得を行う必要がある。

一部カスタマイズ

githubのploneグループにコミット権が無い場合は、clone元を変更する

$ git clone git@github.com:plone/buildout.coredev.git
↓
$ git clone https://github.com/plone/buildout.coredev.git

Plone JPのcoredevを使う場合。

$ git clone git@github.com:plone/buildout.coredev.git
↓
$ git clone git@github.com:plonejp/buildout.coredev.git

起動及び動作チェック

$ ./bin/instance fg

起動できた。
ユーザ: admin パスワード: admin でログインできた。

Plone JPのcoredevに切り替え

$ git remote add plonejp git@github.com:plonejp/buildout.coredev.git
$ git pull plonejp 5.0

plonejp でforkしているレポジトリに変更して、日本語訳を確認する。

$ git branch 5.0-ja
$ git checkout 5.0-ja

取得元を変更

    plone.app.locales
    plone.app.event
    plone.app.dexterity
    plone.dexterity
sources.cfg
# Plone JP
plone_jp = git://github.com/plonejp
plone_jp_push = git@github.com:plonejp
.
.
#plone.app.locales                   = git ${remotes:collective}/plone.app.locales.git pushurl=${remotes:collective_push}/plone.app.locales.git branch=master
plone.app.locales                   = git ${remotes:plone_jp}/plone.app.locales.git pushurl=${remotes:plone_jp_push}/plone.app.locales.git branch=master
checkouts.cfg
auto-checkout =
.
.
# Add for Plone JP
    plone.app.event
    plone.dexterity
bin/buildout

完成!!

注記: 環境構築後(初回buildout後)に、coredevのbranchを切り替えたりplonejpにforkしたものを使うように変更しても、src以下のパッケージがgitの取得元を覚えているので、使いたいbranchにならない。
全ての環境を再構築するか、該当パッケージをsrc消して、再度 buildoutを実行すればよい。

著者関連Blog記事

最新 Plone 5 の開発状況と環境構築

7
8
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8