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 ef50ecc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/upload_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ 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
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Unreleased

### Packaging

- Fix missing modules in self-contained binaries (#2466)

## 21.8b0

### _Black_
Expand Down

0 comments on commit ef50ecc

Please sign in to comment.