forked from briot/geneapro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geneaprove.spec
62 lines (54 loc) · 1.84 KB
/
geneaprove.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
# -*- mode: python -*-
# Spec for pyinstaller 2016-02-08
# pyinstaller does not work out of the box with django 1.7, so we have
# to manually add a number of packages here.
# On El Capitan, it was necessary to modify
# PyInstaller/building/api.py
# and comment out the call to shutil.copystat
block_cipher = None
# Parse settings.py to find required modules and static files
# Future versions of pyinstaller might do that on their own, I guess.
# ??? Would be cleaner to implement as pyinstaller hooks
import os.path
import sys
path = '/Users/briot/genealogy/mysites/'
sys.path = [path] + sys.path
import mysites.settings as appsettings
hiddenimports = [
'.'.join(klass.split('.')[:-1])
for klass in appsettings.MIDDLEWARE_CLASSES]
datas = [
# Extract the directory name, but dir might end with '/'
(dir, os.path.basename(os.path.dirname(dir + '/')))
for dir in appsettings.TEMPLATE_DIRS]
hiddenimports += [app + ".apps" for app in appsettings.INSTALLED_APPS]
hiddenimports += [
'django.contrib.sessions.serializers']
a = Analysis([path + 'geneaprove.py'],
pathex=[path + 'pyinstaller/geneaprove'],
binaries=None,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='geneaprove',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='geneaprove')