-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
executable file
·61 lines (51 loc) · 1.88 KB
/
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
#!/usr/bin/env python3
import os, sys
freeze_options = {}
freeze = "--freeze" in sys.argv
if freeze:
sys.argv.remove("--freeze")
from cx_Freeze import setup, Executable
#try:
# sys.argv.remove("--freeze")
# from cx_Freeze import setup, Executable
#except ImportError:
# print("Warning: cx_Freeze not found. Using distutils")
# from distutils.core import setup
# freeze = False
#if freeze:
base = None
basecli = None
if sys.platform == "win32":
base = "Win32GUI"
# imageformats and platforms directores must be fetched from qt install dir
data_files_cxfreeze = [
'asc/data/', 'README.md', 'imageformats', 'platforms', 'asc/data/stdlib']
build_exe_options = {"packages": ["os", "PyQt5.QtSvg", "PyQt5.QtPrintSupport",
"pkg_resources"],
"excludes": ["tkinter"],
"include_files": data_files_cxfreeze,
"includes": "PyQt5.QtCore"}
freeze_options = {
"executables": [
Executable("asc-qt", base=base, icon="utils/asc.ico"),
Executable("asc-cli", base=basecli, icon="utils/asc.ico"),
],
"options": {"build_exe": build_exe_options},
}
else:
from distutils.core import setup
version = "2.0.1"
setup(name='red-alien',
version=version,
description="The Pokemon Advanced Script Compiler for GBA",
author="Jaume (cosarara97) Delclòs",
author_email="[email protected]",
url="https://www.cosarara.me/redalien/",
packages=['asc'],
package_data={'asc': ['data/*.txt', 'data/*.tbl', 'data/*.png',
'data/*.pks', 'data/*.svg', 'data/stdlib/*']},
#data_files=[('share/applications', ['red-alien.desktop'])],
scripts=['asc-qt', 'asc-cli'],
requires=['sip', 'PyQt5', 'Qsci'],
**freeze_options
)