Better setup
This commit is contained in:
1 parent
6962f441e6
commit
f498e7343a
1 file changed
+14
-4
@@ -12,7 +12,17 @@ lib_dir = os.path.join(base_path, 'libs')
|
|||||||
sys.path.insert(0, base_path)
|
sys.path.insert(0, base_path)
|
||||||
sys.path.insert(0, lib_dir)
|
sys.path.insert(0, lib_dir)
|
||||||
|
|
||||||
|
def getDataFiles(dirs):
|
||||||
|
data_files = []
|
||||||
|
for directory in dirs:
|
||||||
|
for root, dirs, files in os.walk(directory):
|
||||||
|
print files
|
||||||
|
if files:
|
||||||
|
for filename in files:
|
||||||
|
if filename[:-4] is not '.pyc':
|
||||||
|
data_files.append((root, [os.path.join(root, filename)]))
|
||||||
|
|
||||||
|
return data_files
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@@ -21,7 +31,6 @@ if sys.platform == "win32":
|
|||||||
FREEZER = 'py2exe'
|
FREEZER = 'py2exe'
|
||||||
FREEZER_OPTIONS = dict(
|
FREEZER_OPTIONS = dict(
|
||||||
compressed = 0,
|
compressed = 0,
|
||||||
optimize = 0,
|
|
||||||
bundle_files = 3,
|
bundle_files = 3,
|
||||||
dll_excludes = [
|
dll_excludes = [
|
||||||
'MSVCP90.dll',
|
'MSVCP90.dll',
|
||||||
@@ -37,8 +46,10 @@ if sys.platform == "win32":
|
|||||||
'xml.dom',
|
'xml.dom',
|
||||||
'xml.dom.minidom',
|
'xml.dom.minidom',
|
||||||
],
|
],
|
||||||
|
skip_archive = 1,
|
||||||
)
|
)
|
||||||
exeICON = 'icon.ico'
|
exeICON = 'icon.ico'
|
||||||
|
DATA_FILES = getDataFiles([r'.\\couchpotato', r'.\\libs'])
|
||||||
|
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
@@ -62,18 +73,17 @@ elif sys.platform == "darwin":
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
exeICON = None
|
exeICON = None
|
||||||
|
DATA_FILES = ['icon.ico']
|
||||||
|
|
||||||
# Common
|
# Common
|
||||||
NAME = "CouchPotato"
|
NAME = "CouchPotato"
|
||||||
APP = [bdist_esky.Executable("Desktop.py", name = NAME, gui_only = True, icon = exeICON,)]
|
APP = [bdist_esky.Executable("Desktop.py", name = NAME, icon = exeICON,)]
|
||||||
DATA_FILES = ['icon.ico']
|
|
||||||
ESKY_OPTIONS = dict(
|
ESKY_OPTIONS = dict(
|
||||||
freezer_module = FREEZER,
|
freezer_module = FREEZER,
|
||||||
freezer_options = FREEZER_OPTIONS,
|
freezer_options = FREEZER_OPTIONS,
|
||||||
bundle_msvcrt = True,
|
bundle_msvcrt = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Build the app and the esky bundle
|
# Build the app and the esky bundle
|
||||||
setup(
|
setup(
|
||||||
name = NAME,
|
name = NAME,
|
||||||
|
|||||||
Reference in new issue
Block a user