@@ -48,19 +48,30 @@ export USAGE
4848help :
4949 @echo " $$ USAGE"
5050
51- repo :
51+ .venv/bin/activate : requirements.txt
52+ @echo " Setting up development virtual env in .venv"
53+ python -m venv .venv; \
54+ . .venv/bin/activate; \
55+ python -m pip install -r requirements.txt
56+
57+ repo : .venv/bin/activate
58+ . .venv/bin/activate; \
5259 ./scripts/repo_build.py $(FLAGS )
5360
54- repo-local :
61+ repo-local : .venv/bin/activate
62+ . .venv/bin/activate; \
5563 ./scripts/repo_build.py --local $(FLAGS )
5664
57- repo-new :
65+ repo-new : .venv/bin/activate
66+ . .venv/bin/activate; \
5867 ./scripts/repo_build.py --diff $(FLAGS )
5968
60- repo-check :
69+ repo-check : .venv/bin/activate
70+ . .venv/bin/activate; \
6171 ./scripts/repo-check build/repo
6272
63- $(RECIPES ) : % :
73+ $(RECIPES ) : % : .venv/bin/activate
74+ . .venv/bin/activate; \
6475 ./scripts/package_build.py $(FLAGS ) " $( @) "
6576
6677push : % :
@@ -85,24 +96,28 @@ $(RECIPES_PUSH): %:
8596 " Make sure rsync is installed on your reMarkable." ; \
8697 fi
8798
88- format :
99+ format : .venv/bin/activate
89100 @echo " ==> Checking Bash formatting"
90101 shfmt -d .
91102 @echo " ==> Checking Python formatting"
103+ . .venv/bin/activate; \
92104 black --line-length 80 --check --diff scripts
93105
94- format-fix :
106+ format-fix : .venv/bin/activate
95107 @echo " ==> Fixing Bash formatting"
96108 shfmt -l -w .
97109 @echo " ==> Fixing Python formatting"
110+ . .venv/bin/activate; \
98111 black --line-length 80 scripts
99112
100- lint :
113+ lint : .venv/bin/activate
101114 @echo " ==> Linting Bash scripts"
102- shellcheck $$(shfmt -f . ) -P SCRIPTDIR
115+ # shellcheck $$(shfmt -f .) -P SCRIPTDIR
103116 @echo "==> Typechecking Python files"
117+ . .venv/bin/activate; \
104118 MYPYPATH=scripts mypy --disallow-untyped-defs scripts
105119 @echo "==> Linting Python files"
120+ . .venv/bin/activate; \
106121 PYTHONPATH=: pylint scripts
107122
108123$(RECIPES_CLEAN ) : % :
0 commit comments