forked from qgis/QGIS-Documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvenv.mk
27 lines (21 loc) · 720 Bytes
/
venv.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Makefile to create and use a python virtual environment on the fly
# Use sphinx from virtualenv
SPHINXBUILD ?= venv/bin/sphinx-build
SPHINXINTL ?= venv/bin/sphinx-intl
# Create the venv and a timestamp file
venv/venv.timestamp:
python3 -m venv venv
touch $@
# Install requirements and create a timestamp file
venv/REQUIREMENTS.timestamp: venv/venv.timestamp REQUIREMENTS.txt
venv/bin/pip install -r REQUIREMENTS.txt
touch $@
include Makefile
# Delete all including the venv
cleanall: springclean
rm -rf venv
# Add dependencies to targets that require sphinx
html: venv/REQUIREMENTS.timestamp
latex: venv/REQUIREMENTS.timestamp
gettext: venv/REQUIREMENTS.timestamp
fasthtml: venv/REQUIREMENTS.timestamp