forked from cosarara/red-alien
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·54 lines (46 loc) · 1.59 KB
/
setup.py
File metadata and controls
executable file
·54 lines (46 loc) · 1.59 KB
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
#!/usr/bin/env python3
import os, sys
try:
if not "--freeze" in sys.argv: # hack!
fail()
sys.argv.remove("--freeze")
from cx_Freeze import setup, Executable
except:
print("Warning: cx_Freeze not found. Using distutils")
from distutils.core import setup
# lol hack
class Executable:
def __init__(self, a, base):
pass
data_files_cxfreeze = ['asc/data/', 'README', 'imageformats', 'asc/data/stdlib']
build_exe_options = {"packages": ["os", "PyQt5.QtSvg", "PyQt5.QtPrintSupport",
"pkg_resources"],
"include_files": data_files_cxfreeze,
"includes": "PyQt5.QtCore",
"icon": "utils/asc.ico"}
try:
with os.popen("git describe --always | sed 's|-|.|g'") as psfile:
version = psfile.read().strip("\n")
except:
version = "git"
base = None
basecli = None
if sys.platform == "win32":
base = "Win32GUI"
setup(name='Blue Spider',
version=version,
description="The Pokemon Advanced Script Compiler for GBA",
author="Jaume (cosarara97) Delclòs",
author_email="[email protected]",
url="https://github.com/cosarara97/red-alien",
packages=['asc'],
package_data={'asc': ['data/*.txt', 'data/*.tbl', 'data/*.png',
'data/*.pks', 'data/*.svg', 'data/stdlib/*']},
scripts=['asc-qt', 'asc-cli'],
requires=['sip', 'PyQt5', 'Qsci'],
options={"build_exe": build_exe_options},
executables=[
Executable("asc-qt", base=base),
Executable("asc-cli", base=basecli),
],
)