forked from OCR-D/page-to-alto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 1.04 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PYTHON = python3
PIP = pip3
# BEGIN-EVAL makefile-parser --make-help Makefile
help:
@echo ""
@echo " Targets"
@echo ""
@echo " submodules initiate submodules"
@echo " deps Install deps"
@echo " install Install ocrd_page_to_alto"
@echo " install-dev Install ocrd_page_to_alto editable"
@echo " assets Copy OCR-D/assets to tests/assets"
@echo " test Run tests"
@echo ""
@echo " Variables"
@echo ""
# END-EVAL
# initiate submodules
submodules:
git submodule update --init
# Install deps
deps:
$(PIP) install -U pip
$(PIP) install -r requirements.txt
deps-dev:
$(PIP) install -U pip
$(PIP) install -r requirements.dev.txt
# Install ocrd_page_to_alto
install: deps
$(PIP) install .
# Install ocrd_page_to_alto editable
install-dev: deps deps-dev
$(PIP) install -e .
# Copy OCR-D/assets to tests/assets
assets: submodules
rm -rf tests/assets
mkdir -p tests/assets
cp -r repo/assets/data/* tests/assets
cp -r repo/page-alto-resources/* tests/assets
# Run tests
test:
$(PYTHON) -mpytest tests