-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
39 lines (33 loc) · 796 Bytes
/
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
VERB = 0
NOSE = nosetests --nologcapture --verbosity ${VERB}
BPATH = ${CURDIR}/bin
SPATH = ${BPATH}/pyrename
help:
@echo "[targets]"
@echo " tests"
@echo " help"
@echo " clean"
@echo " install"
@echo " bin"
.PHONY : test
test: tests
.PHONY : tests
tests:
${NOSE} -w ./pyrename/tests/
.PHONY : bin
bin: clean
mkdir ${BPATH}
echo '#!/bin/bash -f' > ${SPATH}
echo 'export PYTHONPATH=$$PYTHONPATH:${CURDIR}' >> ${SPATH}
echo 'python3 -m pyrename.apps.main $$*' >> ${SPATH}
chmod +x ${SPATH}
.PHONY : install
install: bin
-mkdir -p ${HOME}/bin
-rm ${HOME}/bin/pyrename
ln -s ${SPATH} ${HOME}/bin/pyrename
.PHONY : clean
clean:
-find ./pyrename -type f -name \*.pyc | xargs -I xxx rm xxx
-find ./pyrename -type d -name __pycache__ | xargs -I xxx rm -rf xxx
-rm -rf ./bin