-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
150 lines (124 loc) · 3.82 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.PHONY: doc runGittk runDemo build deploy buildTest deployTest deploySandbox
.venv:
python3 -m venv .venv
. .venv/bin/activate ; \
pip install -r docs/requirements.txt
# Add "Signal" option in the method domains
# patch -p3 -d .venv/lib/python3*/ < docs/sphynx.001.signal.patch
# Update/Regen
# # Docs
# pip install sphinx sphinx-epytext sphinx-autodocgen sphinx-rtd-theme
# # Test
# pip install flake8 pytest
# # Build
# pip install build twine
# Regen requirements;
# pip freeze > docs/requirements.txt
.venv.ttkDesigner:
python3 -m venv .venv.ttkDesigner
. .venv.ttkDesigner/bin/activate ; \
pip install pyperclip Pillow
doc: .venv
. .venv/bin/activate ; \
tools/prepareBuild.sh doc ; \
make -C docs/source/ clean ; \
make -C docs/source/ html ;
testDoc:
python3 -m http.server --directory docs/source/_build/html/
runTtkDesigner: .venv.ttkDesigner
. .venv.ttkDesigner/bin/activate ; \
python -m ttkDesigner
runGittk: .venv
. .venv/bin/activate ; \
demo/gittk.py -f
runDemo: .venv
. .venv/bin/activate ; \
demo/demo.py -f
runDumbImageTool: .venv
. .venv/bin/activate ; \
tools/dumb.image.tool.py
build: .venv
. .venv/bin/activate ; \
tools/prepareBuild.sh release ; \
cd tmp ; \
python3 -m build
deploy: .venv
. .venv/bin/activate ; \
python3 -m twine upload tmp/dist/*
buildTest: .venv
. .venv/bin/activate ; \
tools/prepareBuild.sh test ; \
cd tmp ; \
python3 -m build
buildTTkDesigner: .venv
. .venv/bin/activate ; \
tools/prepareBuild.sh ttkDesigner ; \
cd tmp ; \
python3 -m build
buildDumbPaintTool: .venv
. .venv/bin/activate ; \
tools/prepareBuild.sh dumbPaintTool ; \
cd tmp ; \
python3 -m build
deployTTkDesigner: .venv
. .venv/bin/activate ; \
python3 -m twine upload tmp/dist/*
pyTermTk-Docs:
git clone git@github.com:ceccopierangiolieugenio/pyTermTk-Docs.git
deployDoc: pyTermTk-Docs
cd pyTermTk-Docs ; \
git checkout main ; \
git pull ; \
rm -rf _* info tutorial ;
cp -a docs/source/_build/html/* \
docs/source/_build/html/.buildinfo \
docs/source/_build/html/.nojekyll \
pyTermTk-Docs ; \
cd pyTermTk-Docs ; \
git add . ; \
git commit -m "Updated Docs" ; \
git push origin main ; \
git checkout gh-pages ; \
git merge main ; \
git push origin gh-pages ;
echo "Docs Deployed!!!"
deploySandbox:
rm -rf tmp/sandbox
mkdir -p tmp/sandbox
cp -a tests/sandbox/*.html tmp/sandbox
cp -a tools/webExporter/js tmp/sandbox
git checkout gh-pages
git pull
cp tmp/sandbox/*.html sandbox
cp -r tmp/sandbox/js sandbox
git submodule update --init
git submodule foreach git checkout gh-pages
git submodule foreach git pull
git add sandbox
git commit -m "Sandbox Updated"
git push origin gh-pages
git checkout main
deployTest: .venv
. .venv/bin/activate ; \
python3 -m twine upload --repository testpypi tmp/dist/* --verbose
itchDumbPaintToolexporter:
tools/webExporterInit.sh
python3 -m http.server --directory tmp
test: .venv
# Record a stream
# tests/pytest/test_001_demo.py -r test.input.bin
# Play the test stream
# tests/pytest/test_001_demo.py -p test.input.bin
mkdir -p tmp
wget -O tmp/test.input.001.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.001.bin
wget -O tmp/test.input.002.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.002.bin
wget -O tmp/test.input.003.bin https://github.com/ceccopierangiolieugenio/binaryRepo/raw/master/pyTermTk/tests/test.input.003.bin
tools/check.import.sh
. .venv/bin/activate ; \
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .venv,build,tmp,experiments ;
. .venv/bin/activate ; \
pytest tests/pytest/test_003_string.py ;
. .venv/bin/activate ; \
pytest tests/pytest/test_002_textedit.py ;
. .venv/bin/activate ; \
pytest -v tests/pytest/test_001_demo.py ;