-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
63 lines (51 loc) · 2.18 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
.SILENT: ;
.PHONY: build
setup:
rm -rf venv build dist *.egg-info
python -m venv venv
install:
pip install --upgrade pip
python setup.py install
clean:
rm -rf build *.egg-info *.log report.tar.gz
uninstall:
rm -rf venv build dist *.egg-info
find . -type d -name '__pycache__' -exec rm -r {} +
run:
python -m kmap
build:
python setup.py sdist bdist_wheel
publish:
python -m twine upload dist/*
test-all:
python -m unittest discover
package:
pyinstaller .\cli.py -w --clean --name kMap --add-data "./kmap/config/*.ini;kmap/config" --add-data "./kmap/resources/images/icon.png;kmap/resources/images" --add-data "./kmap/resources/misc/*;kmap/resources/misc" --add-data "./kmap/resources/texts/*;kmap/resources/texts" --add-data "./kmap/ui/*.ui;kmap/ui" --hidden-import "kmap.controller.realplotoptions" --hidden-import "kmap.controller.miniplots" --hidden-import "kmap.controller.tabwidget" --hidden-import "kmap.controller.profileplot" --hidden-import "kmap.controller.lmfitplot" --add-data "./example/scripts/*.py;example/scripts" --add-data "./example/data/*.hdf5;example/data" --add-data "./example/data/*.cube;example/data"
report:
rm -f report.tar.gz report.tar
tar -cf report.tar *.log
tar -rf report.tar -C ./kmap/config/ logging_user.ini settings_user.ini
@echo 'Running tests...'
-python -m unittest discover 2> test_results.txt
tar -rf report.tar test_results.txt
@echo 'Compiling a report archive...'
gzip report.tar
rm test_results.txt
@echo 'Done. Thanks for using this feature.'
@echo 'Please send report.tar.gz to [email protected]'
# Pleae don't use unless you know what you are doing
freeze:
pip freeze > requirements.txt
# Requires additional installs
generate-uml:
pyreverse -o png -p kMap ./kmap
help:
echo 'Usage:'
echo ' make <command> [options]'
echo 'Commands:'
echo ' setup Sets up a fresh virtual environment.'
echo ' install Installs necessary packages.'
echo ' clean Removes dist and build directories.'
echo ' uninstall Removes the virtual environment, dist, build and all __pycache__ directories.'
echo ' run Starts the application.'
echo ' test-all Runs all available tests.'