File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ ifndef MIG_ENV
2
+ MIG_ENV = 'local'
3
+ endif
1
4
ifeq ($(PY ) ,2)
2
5
PYTHON_BIN = './envhelp/python2'
3
6
else
17
20
@echo " 'make test' - run the test suite"
18
21
@echo " 'make PY=2 test' - run the test suite (python 2)"
19
22
23
+ .PHONY : fmt
24
+ fmt :
25
+ ifneq ($(MIG_ENV ) ,'local')
26
+ @echo "unavailable outside local development environment"
27
+ @exit 1
28
+ endif
29
+ $(PYTHON_BIN) -m autopep8 --ignore E402 -i
30
+
20
31
.PHONY : clean
21
32
clean :
22
33
@rm -f ./envhelp/py2.imageid
@@ -35,10 +46,19 @@ test: dependencies
35
46
.PHONY : dependencies
36
47
dependencies : ./envhelp/venv/pyvenv.cfg ./envhelp/py3.depends
37
48
49
+ ifeq ($(MIG_ENV ) ,'local')
50
+ ./envhelp/py3.depends : $(REQS_PATH ) local-requirements.txt
51
+ else
38
52
./envhelp/py3.depends : $(REQS_PATH )
53
+ endif
39
54
@rm -f ./envhelp/py3.depends
40
55
@echo "installing dependencies from $(REQS_PATH)"
41
56
@./envhelp/venv/bin/pip3 install -r $(REQS_PATH)
57
+ ifeq ($(MIG_ENV ) ,'local')
58
+ @echo ""
59
+ @echo "installing development dependencies"
60
+ @./envhelp/venv/bin/pip3 install -r local-requirements.txt
61
+ endif
42
62
@touch ./envhelp/py3.depends
43
63
44
64
./envhelp/venv/pyvenv.cfg :
Original file line number Diff line number Diff line change
1
+ # migrid dependencies on a format suitable for pip install as described on
2
+ # https://pip.pypa.io/en/stable/reference/requirement-specifiers/
3
+ autopep8
You can’t perform that action at this time.
0 commit comments