-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
70 lines (66 loc) · 2.05 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
67
68
69
70
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from distutils.core import setup
import glob
import os
import sys
import platform
from main import APP_NAME
if platform.system() == 'Windows':
import py2exe
__import__('gtk')
m = sys.modules['gtk']
gtk_base_path = m.__path__[0]
if platform.system() == 'Windows':
setup(
name='pyRsReader',
version='0.0.1',
url='https://github.com/inflop/pyRsReader',
license='GPL',
author='infloper',
author_email='[email protected]',
description='Simple RS232 reader written in Python using pySerial and PyGTK library',
data_files=[("data", glob.glob("data/main.glade")), os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'gdk-pixbuf-query-loaders.exe'), os.path.join(gtk_base_path, '..', 'runtime', 'bin', 'libxml2-2.dll')],
options={
'py2exe': {
'packages': 'encodings', 'includes': 'ctypes, cairo, pango, pangocairo, atk, gio',
"dll_excludes": [
"DNSAPI.DLL"
]
},
},
scripts=[
"main.py",
"gtk_helper.py",
"serial_helper.py",
"generator_task.py",
"main_window.py",
"ports_info_window.py",
"about_window.py",
"settings.py"
],
windows=[{"script": "main.py", "dest_base": APP_NAME}],
requires=["pygtk"]
)
else:
setup(
name='pyRsReader',
version='0.0.1',
url='https://github.com/inflop/pyRsReader',
license='GPL',
author='infloper',
author_email='[email protected]',
description='Simple RS232 reader written in Python using pySerial and PyGTK library',
data_files=[("data", glob.glob("data/main.glade"))],
scripts=[
"main.py",
"gtk_helper.py",
"serial_helper.py",
"generator_task.py",
"main_window.py",
"ports_info_window.py",
"about_window.py",
"settings.py"
],
requires=['pygtk']
)