LoginSignup
0
0

More than 1 year has passed since last update.

ckanプラグインの新規作成

Posted at

環境

ソフトウェアなど バージョン
ckan v2.9.3
python v2.7.13

※ckanは何らかの方法でインストール済みとします。

必要なパッケージのインストール

ソースコードからのビルドを行っている場合は不要となります。

aptなどのパッケージ管理コマンドや、ckan公式のDockerによりインストールしている場合は以下を実行してください。

CKAN_VERSION=2.9.3
# python3の場合は「requirements.txt」を指定
pip install -r https://raw.githubusercontent.com/ckan/ckan/ckan-${CKAN_VERSION}/requirements-py2.txt
pip install -r https://raw.githubusercontent.com/ckan/ckan/ckan-${CKAN_VERSION}/dev-requirements.txt

プラグインの新規作成

作成用コマンドは2種類あります。プラグインの作成先ディレクトリです。

コマンド 作成先ディレクトリ
cookiecutter 任意のディレクトリにプラグインを作成出来る
ckan CLI 作成されるディレクトリは固定

cookiecutter

TBD

※このコマンドは現在実行してもエラーとなります。以下のissuesで議論中のようです。

ckan CLI

source {virtualenvのディレクトリ}/ckan/default/bin/activate
ckan generate extension

実行後に対話式でプラグイン名や作成者の名前を入力していきます。

参考

0
0
0

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
0
0