-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·37 lines (33 loc) · 1.37 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
# -*- coding: utf-8 -*-
import sys
import py2exe
import os
if sys.platform == 'win32':
from distutils.core import setup
origIsSystemDLL = py2exe.build_exe.isSystemDLL
def isSystemDLL(pathname):
if os.path.basename(pathname).lower() in ("qlcoverflow.dll.dll"):
return 0
return origIsSystemDLL(pathname)
py2exe.build_exe.isSystemDLL = isSystemDLL
setup(
name='imguploader',
windows=[{'script':'main.py' , 'icon_resources': [(1, "img/icon.ico")], "dest_base":"imguploader"}],
options = { "py2exe" :
#{"includes" : ["sip", "PictureFlow", 'BeautifulSoup'],
{"includes" : ["sip", 'BeautifulSoup', 'mimetypes', 'urllib2'],
"dist_dir" : "dist",
"optimize":2,
"excludes":["_ssl", "imgsite"],
"compressed":True,
}}
)
elif sys.platform == 'darwin':
from setuptools import setup
APP = ['main.py']
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'BeautifulSoup', 'PictureFlow', 'ImageQt'], 'plist':{'CFBundleDocumentTypes':[], 'CFBundleGetInfoString':'Image uploader'},'iconfile':'PythonApplet.icns'}
setup(
app=APP,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)