-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
executable file
·46 lines (37 loc) · 1.21 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
#!/usr/bin/env python3
import os
import sys
import platform
import glob
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src', 'ext'))
from dsrlib.meta import Meta
if platform.system() == 'Darwin':
from setuptools import setup
data_files = [
('', ['res/avrdude.conf']),
('', ['i18n']),
('configurations', glob.glob('res/configurations/*.zip')),
]
setup(
app=['dsremap.py'],
options={'py2app': {'iconfile': os.path.join('icons', 'dsremap.icns')}},
setup_requires=['py2app'],
data_files=data_files
)
if platform.system() == 'Windows':
from cx_Freeze import setup, Executable
options = {
'include_files': [
(r'res\avrdude.conf', r'resources\avrdude.conf'),
(r'res\configurations', r'resources\configurations'),
(r'i18n', r'resources\i18n'),
]
}
setup(
name=Meta.appName(),
version=str(Meta.appVersion()),
description=Meta.appName(),
options={'build_exe': options},
executables=[Executable('dsremap.py', base='Win32GUI', icon=r'icons\dsremap.ico')]
)