ID: a1485a2b8f028b5725cbae4196c2c1f1d12a6bca
50 lines
—
1K —
View raw
| SHELL = /bin/bash
REPOSITORY = https://github.com/cltk/cltk.git
check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/cltk
else
$(error OUTPUT_PATH is undefined)
endif
venv:
python3 -m venv venv
venv-3.7:
# Requires "_sqlite3" module to compile.
# Install libsqlite3-dev (Debian) and then rebuild Python with "pyenv install 3.7"
export PYENV_VERSION=3.7
python3 -m venv venv
repository:
git clone ${REPOSITORY} repository
v1.1.7 v1.2.1: check_env_vars venv repository
source venv/bin/activate
cd repository
git checkout tags/$@
pip install -r docs/requirements.txt
pip install .
cd docs
make clean dirhtml
mkdir --parents "${OUTPUT_PATH}"
cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"
1.0.15: check_env_vars venv-3.7 repository
source venv/bin/activate
cd repository
git checkout tags/$@
# Lock jinja2 because the docs uses deprecated calls
pip install -r docs/requirements.txt "jinja2 < 3.1"
pip install .
cd docs
make clean dirhtml
mkdir --parents "${OUTPUT_PATH}"
cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"
.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR:
|