8000 Reorganized make files. · masteringmatplotlib/architecture@a0a1964 · GitHub
[go: up one dir, main page]

Skip to content

Commit a0a1964

Browse files
committed
Reorganized make files.
1 parent 6c40f70 commit a0a1964

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

Makefile

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
VENV=../.venv-mmpl
2-
PYTHON=python3.4
3-
IPYTHON=ipython3
4-
SYSTEM_PYTHON=$(shell which $(PYTHON))
5-
SOURCE=./lib
61
MYPY=$(VENV)/bin/mypy
2+
NOTEBOOK=notebooks/mmpl-arch.ipynb
73

8-
virtual-env:
9-
$(SYSTEM_PYTHON) -m venv $(VENV)
4+
include include/common.mk
105

116
pygraphviz:
127
@git clone https://github.com/pygraphviz/pygraphviz
@@ -23,26 +18,7 @@ $(MYPY):
2318
cd mypy && $(PYTHON) setup.py install
2419
rm -rf mypy
2520

26-
deps: pygraphviz
27-
. $(VENV)/bin/activate && \
28-
pip3.4 install -r requirements.txt
29-
30-
setup: virtual-env deps
31-
. $(VENV)/bin/activate
32-
33-
run:
34-
. $(VENV)/bin/activate && \
35-
$(IPYTHON) notebook notebooks/mmpl-arch.ipynb
36-
37-
clean:
38-
rm -rf $(VENV)
39-
40-
repl:
41-
. $(VENV)/bin/activate && $(IPYTHON)
42-
43-
flakes:
44-
@echo "\nChecking for flakes ...\n"
45-
flake8 $(SOURCE)
21+
deps: pygraphviz project-deps
4622

4723
types: $(MYPY)
4824
@echo "\nChecking types ...\n"

include/common.mk

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
VENV=../.venv-mmpl
2+
PYTHON=python3.4
3+
IPYTHON=ipython3
4+
SYSTEM_PYTHON=$(shell which $(PYTHON))
5+
SOURCE=./lib
6+
7+
virtual-env:
8+
$(SYSTEM_PYTHON) -m venv $(VENV)
9+
10+
project-deps:
11+
. $(VENV)/bin/activate && \
12+
pip3.4 install -r requirements.txt
13+
14+
setup: virtual-env deps
15+
16+
run:
17+
. $(VENV)/bin/activate && \
18+
$(IPYTHON) notebook $(NOTEBOOK)
19+
20+
clean:
21+
rm -rf $(VENV)
22+
23+
repl:
24+
. $(VENV)/bin/activate && $(IPYTHON)
25+
26+
flakes:
27+
@echo "\nChecking for flakes ...\n"
28+
flake8 $(SOURCE)

0 commit comments

Comments
 (0)
0