forked from OCR-D/ocrd_kraken
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (52 loc) · 1.23 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
export
SHELL = /bin/bash
PYTHON = python
PIP = pip
LOG_LEVEL = INFO
PYTHONIOENCODING=utf8
# Docker container tag ("$(DOCKER_TAG)")
DOCKER_TAG = 'ocrd/kraken'
# BEGIN-EVAL makefile-parser --make-help Makefile
help:
@echo ""
@echo " Targets"
@echo ""
@echo " deps Install python deps via pip"
@echo " deps-test Install testing deps via pip"
@echo " install Install"
@echo " docker Build docker image"
@echo " test Run test"
@echo " repo/assets Clone OCR-D/assets to ./repo/assets"
@echo " assets Setup test assets"
@echo ""
@echo " Variables"
@echo ""
@echo " DOCKER_TAG Docker container tag ("$(DOCKER_TAG)")"
# END-EVAL
# Install python deps via pip
deps:
$(PIP) install -r requirements.txt
# Install testing deps via pip
deps-test:
$(PIP) install -r requirements_test.txt
# Install
install:
$(PIP) install -e .
# Build docker image
docker:
docker build -t $(DOCKER_TAG) .
.PHONY: test
# Run test
test:
$(PYTHON) -m pytest test
#
# Assets
#
# Clone OCR-D/assets to ./repo/assets
repo/assets:
mkdir -p $(dir $@)
git clone https://github.com/OCR-D/assets "$@"
# Setup test assets
assets: repo/assets
mkdir -p test/assets
cp -r -t test/assets repo/assets/data/*