From c153e37ccfaf51fc3db10a12a9390baad4dd5db6 Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Tue, 15 Sep 2020 09:12:18 +0800 Subject: [PATCH] Add Makefile --- Makefile | 30 ++++++++++++++++++++++++++++++ linux_make.py | 6 ------ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 Makefile delete mode 100644 linux_make.py diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..05ef475 --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +#.PHONY: help prepare-dev test lint run doc + +#VENV_NAME?=venv +#VENV_ACTIVATE=. $(VENV_NAME)/bin/activate +#PYTHON=${VENV_NAME}/bin/python3 +SHELL = /bin/bash + +.DEFAULT: make +make: + @echo "[+]make prepare-dev" + sudo apt-get -y install python3.7 python3-pip + pip3 install -r requirements.txt + + #@echo "[+]Set CLOUDSCRAPER_PATH variable" + #export cloudscraper_path=$(python3 -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1) + + @echo "[+]Pyinstaller make" + pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py + + @echo "[+]Move to bin" + if [ ! -d "./bin" ];then mkdir bin; fi + mv dist/* bin/ + cp config.ini bin/ + rm -rf dist/ + + @echo "[+]Clean cache" + @find . -name '*.pyc' -delete + @find . -name '__pycache__' -type d | xargs rm -fr + @find . -name '.pytest_cache' -type d | xargs rm -fr + rm -rf build/ diff --git a/linux_make.py b/linux_make.py deleted file mode 100644 index 7d062e3..0000000 --- a/linux_make.py +++ /dev/null @@ -1,6 +0,0 @@ -import os -os.system("pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py") -os.system("rm -rf ./build") -os.system("rm -rf ./__pycache__") -os.system("rm -rf AV_Data_Capture.spec") -os.system("echo '[Make]Finish'")