How to Upgrade Requirements - ckan/ckan GitHub Wiki
Work in progress
This page describes how requirements are installed. There are different instructions for production environments, developers and the docs. This page also describes how to update the requirements.
Install requirements
Production
In the CKAN root directory, run pip install -r requirements.txt
.
Developers
First, install the requirements as you would do for a production environment. There are some additional requirements for testing and building the docs which can be installed with pip install -r dev-requirements.txt
.
Upgrading requirements
Inside a virtualenv with only CKAN dependencies (created using virtualenv --no-site-packages venv
), do:
-
Install the requirements from the file with unpinned versions using:
pip install -r requirements.in
; -
Run
pip freeze > requirements.txt
to save the new dependency versions. We do this before the other dependencies install so we can get only what was inrequirements.in
; -
Install CKAN with
python setup.py develop
; -
Install the development requirements using
pip install -r dev-requirements.txt
.; -
Run the tests and check if everything works well. If not, either fix the problem, or pinpoint what new dependency version broke our tests, find an older version that still works, and add it to
requirements.in
. Recreate your virtualenv and go back to step 1; -
Review the changes and make sure everything is OK. Make sure you understand every dependency change