diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58a7686..759b1d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,7 +31,7 @@ jobs: - name: Set VERSION variable run: | - version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') + version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)') echo "::set-env name=VERSION::$version" - name: Set CLOUDSCRAPER_PATH variable @@ -79,13 +79,13 @@ jobs: - name: Set VERSION variable run: | - $env:version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') - echo "::set-env name=VERSION::$env:version" + $version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)') + echo "::set-env name=VERSION::$version" - name: Set CLOUDSCRAPER_PATH variable run: | - $env:cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1) - echo "::set-env name=CLOUDSCRAPER_PATH::$env:cloudscraper_path" + $cloudscraper_path=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1) + echo "::set-env name=CLOUDSCRAPER_PATH::$cloudscraper_path" - name: Build with PyInstaller run: | @@ -127,7 +127,7 @@ jobs: - name: Set VERSION variable run: | - version=$(python -c 'import AV_Data_Capture; print(AV_Data_Capture.__version__)') + version=$(python -c 'import AV_Data_Capture as _; print(_.__version__)') echo "::set-env name=VERSION::$version" - name: Set CLOUDSCRAPER_PATH variable diff --git a/linux_make.py b/linux_make.py deleted file mode 100755 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'") diff --git a/linux_make.sh b/linux_make.sh new file mode 100644 index 0000000..73fd066 --- /dev/null +++ b/linux_make.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CLOUDSCRAPER_PATH=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1) + +pyinstaller --onefile AV_Data_Capture.py \ + --hidden-import ADC_function.py \ + --hidden-import core.py \ + --add-data "$CLOUDSCRAPER_PATH:cloudscraper" + +rm -rf build +rm -rf __pycache__ +rm -rf AV_Data_Capture.spec + +echo "[Make]Finish" +read -n 1 diff --git a/py_to_exe.bat b/py_to_exe.bat deleted file mode 100644 index 8255d40..0000000 --- a/py_to_exe.bat +++ /dev/null @@ -1,4 +0,0 @@ -pyinstaller --onefile AV_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py -rmdir /s/q build -rmdir /s/q __pycache__ -pause \ No newline at end of file diff --git a/py_to_exe.ps1 b/py_to_exe.ps1 new file mode 100644 index 0000000..9c919ca --- /dev/null +++ b/py_to_exe.ps1 @@ -0,0 +1,16 @@ +# If you can't run this script, please execute the following command in PowerShell. +# Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force + +$CLOUDSCRAPER_PATH=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1) + +pyinstaller --onefile AV_Data_Capture.py ` + --hidden-import ADC_function.py ` + --hidden-import core.py ` + --add-data "$CLOUDSCRAPER_PATH;cloudscraper" + +rmdir -Recurse -Force build +rmdir -Recurse -Force __pycache__ +rmdir -Recurse -Force AV_Data_Capture.spec + +echo "[Make]Finish" +pause \ No newline at end of file diff --git a/test.py b/test.py deleted file mode 100644 index 930541c..0000000 --- a/test.py +++ /dev/null @@ -1,5 +0,0 @@ -## 2020.6.22 更新 -* 改进:网站爬虫子程序参数混乱 -* 修复:命名规则release参数带```/```的问题 -* 新增:socks5本地代理连接 -* 新增:命名规则series参数 \ No newline at end of file