-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (31 loc) · 885 Bytes
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
DESTDIR ?= /
ETC = ${DESTDIR}/etc
PREFIX ?= /usr
PYTHON ?= python3
install:
# Cleanup temporary files
rm -f INSTALLED_FILES
# Copy config file to /etc
mkdir -p "${ETC}"
cp include/etc/metax.cfg ${ETC}/
# Use Python setuptools
python3 ./setup.py install -O1 --prefix="${PREFIX}" --root="${DESTDIR}" --record=INSTALLED_FILES
github:
python3 -mvenv venv; \
source venv/bin/activate; \
pip install --upgrade pip setuptools; \
pip install -r requirements_dev.txt; \
pip install .; \
if [ ! -f ~/.metax.cfg ]; then \
cp include/etc/metax.cfg ~/.metax.cfg; \
fi
clean: clean-rpm
find . -iname '*.pyc' -type f -delete
find . -iname '__pycache__' -exec rm -rf '{}' \; | true
rm -rf coverage.xml htmlcov junit.xml .coverage
clean-rpm:
rm -rf rpmbuild
rm -rf doc/build doc/source/modules
.PHONY: doc
doc:
PYTHONPATH="../" make -C doc html