From 58c21923da6b8ea7ff8442ae52b2c9b624f75e7d Mon Sep 17 00:00:00 2001 From: Jameel Al-Aziz Date: Tue, 31 Aug 2021 04:10:21 -0700 Subject: [PATCH] Add hidden import to PyInstaller build Add new platformdirs dependency as a hidden import when creating PyInstaller based binaries. --- .github/workflows/upload_binary.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload_binary.yml b/.github/workflows/upload_binary.yml index 766f37cc321..9ea994c1940 100644 --- a/.github/workflows/upload_binary.yml +++ b/.github/workflows/upload_binary.yml @@ -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