-
Notifications
You must be signed in to change notification settings - Fork 39
/
setup.py
70 lines (51 loc) · 2.18 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
62
63
64
65
66
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
import sys
if sys.platform == "darwin":
from setuptools import setup
APP = ['P2PP.py']
DATA_FILES = ['p2pp.ui', 'p2ppconf.ui', "SendError.ui", "p3browser.ui"]
OPTIONS = {'argv_emulation': True,
"iconfile": "icons/icon.icns",
#"includes": ['PyQt5._qt'],
"includes": ['PyQt5.QtWidgets','PyQt5.QtGui', 'PyQt5.Qt', 'PyQt5', 'PyQt5.QtCore'],
"excludes": ["tkinter"]
}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
install_requires = [],
setup_requires=['py2app']
)
if sys.platform == "linux":
import sys
import version
from cx_Freeze import setup, Executable
includefiles = ["p2pp.ui", 'p2ppconf.ui', "icons/icon.ico", "SendError.ui", "p3browser.ui"]
excludes = ["tkinter"]
includes = ['PyQt5.QtWidgets', 'PyQt5.QtGui', 'PyQt5.Qt', 'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtWebEngineWidgets']
build_exe_options = {"packages": ["os"], 'include_files': includefiles, "excludes": excludes, "includes": includes}
setup(name="p2pp",
version=version.Version,
description="P2PP - Palette 2 Post Processing tool for Prusa Slicer",
options={"build_exe": build_exe_options},
executables=[Executable("P2PP.py", base=None, icon="icons/icon.ico")]
)
if sys.platform == "win32":
import sys
import version
from cx_Freeze import setup, Executable
includefiles = ["p2pp.ui", 'p2ppconf.ui', "icons/icon.ico", "SendError.ui", "p3browser.ui"]
excludes = ["tkinter"]
includes = ['PyQt5.QtWidgets', 'PyQt5.QtGui', 'PyQt5.Qt', 'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtWebEngineWidgets']
build_exe_options = {"packages": ["os"], 'include_files': includefiles, "excludes": excludes, "includes": includes}
setup(name="p2pp",
version=version.Version,
description="P2PP - Palette 2 Post Processing tool for Prusa Slicer",
options={"build_exe": build_exe_options},
executables=[Executable("p2pp.py", base="Win32GUI", icon="icons/icon.ico")]
)