home » zplus/dokk.git
ID: 9b1c5b1c0c5c1834c74eacc2fed27585f475813c
119 lines — 3K — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/numpy/numpydoc.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/numpydoc
else
	$(error OUTPUT_PATH is undefined)
endif

venv-3.11:
	export PYENV_VERSION=3.11
	python3 -m venv venv

venv-3.10:
	export PYENV_VERSION=3.10
	python3 -m venv venv

venv-3.7:
	export PYENV_VERSION=3.7
	python3 -m venv venv

venv-3.6:
	export PYENV_VERSION=3.6
	python3 -m venv venv

repository:
	git clone ${REPOSITORY} repository

v1.6.0 v1.7.0: check_env_vars venv-3.11 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install -r requirements/default.txt -r requirements/developer.txt -r requirements/doc.txt -r requirements/test.txt .[doc]
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v1.5.0: check_env_vars venv-3.11 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install -r requirements/developer.txt -r requirements/doc.txt -r requirements/test.txt .[doc]
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v1.3.1 v1.4.0: check_env_vars venv-3.10 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install -r requirements/developer.txt -r requirements/test.txt  -r doc/requirements.txt
	pip install .
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v1.2.1: check_env_vars venv-3.10 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install -r doc/requirements.txt -r test_requirements.txt
	pip install .
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v1.1.0: check_env_vars venv-3.7 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	git submodule update --init --recursive
	pip install -r doc/requirements.txt -r test_requirements.txt
	pip install .
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v1.0.0: check_env_vars venv-3.7 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	git submodule update --init --recursive
	pip install -r doc/requirements.txt
	pip install .
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

v0.9.2: check_env_vars venv-3.6 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	git submodule update --init --recursive
	pip install -r doc/requirements.txt
	pip install .
	cd doc
	make clean
	make dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR: