Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Fix importing google-api-python-client
Browse files Browse the repository at this point in the history
This was a very nonobvious problem.  The solution came from a GitHub
issue report: googleapis/google-api-python-client#876
  • Loading branch information
mhucka committed Sep 24, 2020
1 parent 24aa6f8 commit 3030584
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pyinstaller-win32.spec
Expand Up @@ -9,21 +9,28 @@

import imp
import os
from PyInstaller.utils.hooks import copy_metadata
import sys

# The list must contain tuples: ('file', 'destination directory').
data_files = [ ('lostit\lostit.ini', 'lostit'),
('lostit\data\client_secrets.json', 'lostit\data'),
('lostit\data\help.html', 'lostit\data') ]

# A breaking change in google-api-python-client caused the need for this.
# See https://github.com/googleapis/google-api-python-client/issues/876
# This solution came from user Jay Lee in a comment on the issue at
# https://github.com/googleapis/google-api-python-client/issues/876#issuecomment-625779315
data_files += copy_metadata('google-api-python-client')

configuration = Analysis([r'lostit\__main__.py'],
pathex = ['.'],
binaries = [],
datas = data_files,
hiddenimports = ['apiclient', 'keyring.backends',
'wx._html', 'wx._xml',
'win32timezone', 'winreg'],
hookspath = [],
hookspath = ['pyinstaller-hooks'],
runtime_hooks = [],
excludes = [],
win_no_prefer_redirects = False,
Expand All @@ -43,11 +50,15 @@ executable = EXE(application_pyz,
configuration.datas,
name = 'LostIt',
icon = r'dev\icons\generated-icons\lostit-icon-512px.ico',
debug = False,
strip = False,
upx = True,
runtime_tmpdir = None,
# To debug run problems on Windows, first try setting
# console to True. If that doesn't reveal enough, then
# try setting debug to True. (Debug produces a lot of
# dialogs, so better to start with console.)
console = False,
debug = False,
)

app = BUNDLE(executable,
Expand Down

0 comments on commit 3030584

Please sign in to comment.