Skip to content

Installation

Path variables used below: - $INSTALL_FOLDER (i.e. where CKAN is installed), e.g. /usr/lib/ckan/default - $CONFIG_FILE, e.g. /etc/ckan/default/development.ini

Installing from PyPI

pip install ckanext-doi

Installing from source

  1. Clone the repository into the src folder:

    cd $INSTALL_FOLDER/src
    git clone https://github.com/NaturalHistoryMuseum/ckanext-doi.git
    

  2. Activate the virtual env:

    . $INSTALL_FOLDER/bin/activate
    

  3. Install via pip:

    pip install $INSTALL_FOLDER/src/ckanext-doi
    

Installing in editable mode

Installing from a pyproject.toml in editable mode (i.e. pip install -e) requires setuptools>=64; however, CKAN 2.9 requires setuptools==44.1.0. See our CKAN fork for a version of v2.9 that uses an updated setuptools if this functionality is something you need.

Post-install setup

  1. Add 'doi' to the list of plugins in your $CONFIG_FILE:

    ckan.plugins = ... doi
    

  2. Initialise the database:

    ckan -c $CONFIG_FILE doi initdb
    

  3. This extension will only work if you have signed up for an account with DataCite. You will need a development/test account to use this plugin in test mode, and a live account to mint active DOIs.