-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (28 loc) · 908 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
.PHONY: all clean mrproper test FORCE
PYTHON3=python3
all: build/bibboost.pyz
build/bibboost.pyz: build/venv/bin/activate requirements.txt $(wildcard bibboost/*) $(wildcard bibboost/**/*)
mkdir -p build/bibboost
cp -R bibboost build/bibboost/bibboost
set -e; \
source build/venv/bin/activate; \
cd build; \
python3 -m pip install -r ../requirements.txt -t bibboost; \
rm -rf bibboost/pybtex/tests bibboost/*.dist-info; \
find bibboost -name '__pycache__' -delete; \
find bibboost -regex '.*\.py[co]$$' -delete; \
python3 -m zipapp bibboost -m "bibboost.__main__:main" -p "/usr/bin/env python3"
build/venv/bin/activate:
mkdir -p build
$(PYTHON3) -m venv build/venv
set -e; \
source build/venv/bin/activate; \
python3 -m pip install --upgrade pip
test:
cd test && $(MAKE) test
clean:
cd test && $(MAKE) clean
rm -rf build/venv
rm -rf build/bibboost
mrproper: clean
rm -rf build