home » zplus/dokk.git
ID: b9b938719014469eb557389b6d75e2f2cdf8b66b
126 lines — 3K — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/sympy/sympy.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/sympy
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.8:
	export PYENV_VERSION=3.8
	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

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

repository:
	git clone ${REPOSITORY} repository

sympy-1.11.1 sympy-1.12: check_env_vars venv-3.11 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .
	pip install -r doc/requirements.txt
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

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

sympy-1.7.1 sympy-1.8 sympy-1.9: check_env_vars venv-3.8 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .
	pip install -r release/requirements.txt
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

sympy-1.6.2: check_env_vars venv-3.7 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install sphinx mpmath sphinx_math_dollar matplotlib
	pip install .
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

sympy-1.1.1 sympy-1.2 sympy-1.3 sympy-1.4 sympy-1.5.1: check_env_vars venv-3.6 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install "sphinx < 4" sphinx_math_dollar matplotlib
	pip install .
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

sympy-1.0: check_env_vars venv-3.5 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install "sphinx < 1.6"
	pip install .
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

sympy-0.7.6.1: check_env_vars venv-3.5 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install "sphinx < 1.6"
	pip install .
	cd doc
	make clean
	make html
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/html "${OUTPUT_PATH}/$@"

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