This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
generated from caltechlibrary/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyinstaller-darwin.spec
72 lines (63 loc) · 3.11 KB
/
pyinstaller-darwin.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- mode: python -*-
# =============================================================================
# @file pyinstaller-darwin.spec
# @brief Spec file for PyInstaller for macOS
# @author Michael Hucka
# @license Please see the file named LICENSE in the project directory
# @website https://github.com/caltechlibrary/checkit
# =============================================================================
import importlib
from os import path
import sys
# The addition of setup.cfg is so that our __init__.py code can work even
# when bundled into the PyInstaller-created application.
data_files = [ ('checkit/data/help.html', 'checkit/data'),
('setup.cfg', 'checkit/data') ]
# The "colorful" package has a data file that doesn't get picked up
# automatically, so we have to deal with it ourselves.
colorful_package = importlib.import_module('colorful')
colorful_path = path.dirname(colorful_package.__file__)
data_files += [(path.join(colorful_path, 'data', 'rgb.txt'), 'colorful/data')]
# The rest is pretty normal PyInstaller stuff.
configuration = Analysis(['checkit/__main__.py'],
pathex = ['.'],
binaries = [],
datas = data_files,
hiddenimports = [ 'keyring.backends',
'keyring.backends.OS_X',
'wx._html',
'wx._xml'],
hookspath = [],
runtime_hooks = [],
# For reasons I can't figure out, PyInstaller tries
# to load these even though they're never imported
# by the Checkit code. Have to exclude them manually.
excludes = ['PyQt4', 'PyQt5', 'gtk', 'matplotlib',
'numpy'],
win_no_prefer_redirects = False,
win_private_assemblies = False,
cipher = None,
)
application_pyz = PYZ(configuration.pure,
configuration.zipped_data,
cipher = None,
)
executable = EXE(application_pyz,
configuration.scripts,
configuration.binaries,
configuration.zipfiles,
configuration.datas,
name = 'checkit',
debug = False,
strip = False,
upx = True,
runtime_tmpdir = None,
console = False,
)
app = BUNDLE(executable,
name = 'CheckIt.app',
icon = 'dev/icons/generated-icons/checkit-icon.icns',
bundle_identifier = None,
info_plist = {'NSHighResolutionCapable': 'True',
'NSAppleScriptEnabled': False},
)