Skip to content

Commit

Permalink
Add hidden import to PyInstaller build
Browse files Browse the repository at this point in the history
Add new platformdirs dependency as a hidden import when creating
PyInstaller based binaries.
  • Loading branch information
jalaziz committed Aug 31, 2021
1 parent 79575f3 commit 58c2192
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/upload_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ jobs:
python -m pip install pyinstaller
- name: Build binary
run: |
python -m PyInstaller -F --name ${{ matrix.asset_name }} --add-data 'src/blib2to3${{ matrix.pathsep }}blib2to3' src/black/__main__.py
run: >
python -m PyInstaller -F --name ${{ matrix.asset_name }} --add-data 'src/blib2to3${{ matrix.pathsep }}blib2to3'
--hidden-import platformdirs.unix --hidden-import platformdirs.macos --hidden-import platformdirs.windows
src/black/__main__.py
- name: Upload binary as release asset
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit 58c2192

Please sign in to comment.