-
Notifications
You must be signed in to change notification settings - Fork 1
/
cx_setup.py
70 lines (60 loc) · 1.83 KB
/
cx_setup.py
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
# -*- coding: utf-8 -*-
"""Setup config for cx_freeze (built)"""
import os.path
from cx_Freeze import setup, Executable
# Derive Package Paths Dynamically
PYTHON_INSTALL_DIR = os.path.dirname(
os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(
PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(
PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
VERSION_DICT = {}
with open("tagmaps/version.py") as fp:
exec(fp.read(), VERSION_DICT) # pylint: disable=W0122
# Dependencies are automatically detected,
# but it might need fine tuning.
INCLUDES_MOD = [
"tkinter.filedialog",
'numpy.core._methods',
'numpy.lib.format',
'matplotlib.backends.backend_tkagg',
'seaborn',
'seaborn.cm',
'scipy.sparse.csgraph',
'argparse',
'scipy.sparse.csgraph._validation'
]
INCLUDE_FOLDERS_FILES = [
"C:/Python36/DLLs/tcl86t.dll",
"C:/Python36/DLLs/tk86t.dll",
'01_Input/',
'00_Config/',
'00_generateClusters_OnlyEmoji.cmd',
'00_generateClusters_OnlyPhotoLocations.cmd',
'00_generateClusters_OnlyTags.cmd',
('tagmaps/matplotlibrc',
"matplotlibrc")
]
PACKAGES_MOD = ["tkinter", "hdbscan"]
EXCLUDES_MOD = ["scipy.spatial.cKDTree"]
# GUI applications require a different base on Windows
# (the default is for a console application).
BASE = None
EXECUTABLES = [
Executable('tagmaps/__main__.py',
base=BASE,
targetName="tagmaps.exe")
]
setup(name="tagmaps",
version=VERSION_DICT['__version__'],
description="Tag Clustering for Tag Maps",
options={
'build_exe': {
'includes': INCLUDES_MOD,
'include_files': INCLUDE_FOLDERS_FILES,
'packages': PACKAGES_MOD,
'excludes': EXCLUDES_MOD,
'optimize': 2}
},
executables=EXECUTABLES)