forked from pychess/pychess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pychess-engine.spec
43 lines (37 loc) · 1.4 KB
/
pychess-engine.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
# -*- mode: python -*-
import os
import platform
a = Analysis(['lib/pychess/Players/PyChess.py'],
pathex=[],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
home = os.path.expanduser("~")
name = "pychess-engine"
if platform.system() == "Windows":
modules = ("_hashlib", "_ssl", "bz2", "select", "unicodedata", "pyexpat")
excludes = [(module, "'c:\\python27\\DLLs\\%s.pyd" % module, 'EXTENSION') for module in modules]
name += ".exe"
console = False
data = [('pychess_book.bin', "..\\pychess\\pychess_book.bin", 'DATA')]
else:
modules = ("_codecs_cn", "_codecs_hk", "_codecs_iso2022", "_codecs_jp", "_codecs_kr", "_codecs_tw",
"_multibytecodecs", "_ssl", "audioop", "bz2", "unicodedata")
excludes = [(module, "/usr/lib/python2.7/lib-dynload/%s.so" % module, 'EXTENSION') for module in modules]
libs = ("libcrypto.so.1.0.0", "libssl.so.1.0.0")
excludes += [(lib, "/usr/lib/%s" % lib, "BINARY") for lib in libs]
console = True
data = [('pychess_book.bin', "%s/pychess/pychess_book.bin" % home, 'DATA')]
exe = EXE(pyz,
a.scripts,
a.binaries - excludes + data,
a.zipfiles,
a.datas,
[('u', None, 'OPTION')],
name=name,
debug=False,
strip=None,
upx=True,
console=console,
noconsole=True)