diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfa4942..e25f057 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,8 +14,6 @@ on: env: PYTHONUTF8: 1 PYTHONIOENCODING: UTF-8 - PYTHONLEGACYWINDOWSSTDIO: "" - PYTHONLEGACYWINDOWSFSENCODING: "" jobs: commit: @@ -63,8 +61,6 @@ jobs: if: matrix.env-version.os == 'windows-latest' run: | pyinstaller --clean --noconfirm --strip --noupx --console --onefile --add-data 'whispers/config.yml;whispers' --add-data 'whispers/rules/*.yml;whispers/rules' --name whispers.exe whispers/main.py - dist/whispers.exe --help - dist/whispers.exe --init dist/whispers.exe tests/fixtures - name: compile .bin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d309fed..5c6cf33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,21 +91,21 @@ jobs: run: | pyinstaller --clean --noconfirm --strip --noupx --console --onefile --add-data 'whispers/config.yml:whispers' --add-data 'whispers/rules/*.yml:whispers/rules' --name ${{ matrix.env-version.binary }} whispers/main.py sha256sum --binary dist/${{ matrix.env-version.binary }} > dist/${{ matrix.env-version.binary }}.sha256.txt - dist/${{ matrix.env-version.binary }} + dist/${{ matrix.env-version.binary }} --version - name: 'whispers.mac: Mach-O 64-bit x86_64 executable' if: ${{ matrix.env-version.os == 'macos-latest' }} run: | pyinstaller --clean --noconfirm --strip --noupx --console --onefile --add-data 'whispers/config.yml:whispers' --add-data 'whispers/rules/*.yml:whispers/rules' --name ${{ matrix.env-version.binary }} whispers/main.py shasum --binary --algorithm 256 dist/${{ matrix.env-version.binary }} > dist/${{ matrix.env-version.binary }}.sha256.txt - dist/${{ matrix.env-version.binary }} + dist/${{ matrix.env-version.binary }} --version - name: 'whispers.exe: PE32+ executable (console) x86-64' if: ${{ matrix.env-version.os == 'windows-latest' }} run: | pyinstaller --clean --noconfirm --strip --noupx --console --onefile --add-data 'whispers/config.yml;whispers' --add-data 'whispers/rules/*.yml;whispers/rules' --name ${{ matrix.env-version.binary }} whispers/main.py certUtil -hashfile dist/${{ matrix.env-version.binary }} SHA256 > dist/${{ matrix.env-version.binary }}.sha256.txt - dist/${{ matrix.env-version.binary }} + dist/${{ matrix.env-version.binary }} --version - name: upload binary uses: svenstaro/upload-release-action@v2 diff --git a/whispers/main.py b/whispers/main.py index dd063f0..ab0a233 100644 --- a/whispers/main.py +++ b/whispers/main.py @@ -14,6 +14,7 @@ from whispers.core.secrets import detect_secrets from whispers.models.pair import KeyValuePair +environ["PYTHONUTF8"] = "1" environ["PYTHONIOENCODING"] = "UTF-8"