Skip to content

Commit

Permalink
UTF8 Locale (#112)
Browse files Browse the repository at this point in the history
* UTF8 Locale on Windows
  • Loading branch information
adeptex authored Oct 24, 2023
1 parent d212f39 commit 185f7e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ on:
env:
PYTHONUTF8: 1
PYTHONIOENCODING: UTF-8
PYTHONLEGACYWINDOWSSTDIO: ""
PYTHONLEGACYWINDOWSFSENCODING: ""

jobs:
commit:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions whispers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from whispers.core.secrets import detect_secrets
from whispers.models.pair import KeyValuePair

environ["PYTHONUTF8"] = "1"
environ["PYTHONIOENCODING"] = "UTF-8"


Expand Down

0 comments on commit 185f7e2

Please sign in to comment.