Extract zip after build, for testing
This commit is contained in:
1 parent
465e7b2abc
commit
0e2f8a612c
1 file changed
+10
-2
@@ -1,8 +1,9 @@
|
|||||||
from esky import bdist_esky
|
from esky import bdist_esky
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import version
|
import version
|
||||||
import os
|
import zipfile
|
||||||
|
|
||||||
|
|
||||||
# Include proper dirs
|
# Include proper dirs
|
||||||
@@ -57,6 +58,7 @@ if sys.platform == "win32":
|
|||||||
exeICON = os.path.join(base_path, 'icon.ico')
|
exeICON = os.path.join(base_path, 'icon.ico')
|
||||||
DATA_FILES = getDataFiles([r'.\\couchpotato', r'.\\libs'])
|
DATA_FILES = getDataFiles([r'.\\couchpotato', r'.\\libs'])
|
||||||
DATA_FILES.append('icon.png')
|
DATA_FILES.append('icon.png')
|
||||||
|
file_ext = 'win32.zip'
|
||||||
|
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
@@ -65,6 +67,7 @@ elif sys.platform == "darwin":
|
|||||||
|
|
||||||
FREEZER = 'py2app'
|
FREEZER = 'py2app'
|
||||||
FREEZER_OPTIONS = dict(
|
FREEZER_OPTIONS = dict(
|
||||||
|
optimize = 2,
|
||||||
strip = True,
|
strip = True,
|
||||||
argv_emulation = False,
|
argv_emulation = False,
|
||||||
site_packages = False,
|
site_packages = False,
|
||||||
@@ -78,6 +81,8 @@ elif sys.platform == "darwin":
|
|||||||
exeICON = None
|
exeICON = None
|
||||||
DATA_FILES = ['icon.png']
|
DATA_FILES = ['icon.png']
|
||||||
|
|
||||||
|
file_ext = 'macosx-10_6-intel.zip'
|
||||||
|
|
||||||
# Common
|
# Common
|
||||||
NAME = "CouchPotato"
|
NAME = "CouchPotato"
|
||||||
APP = [bdist_esky.Executable("Desktop.py", name = NAME, icon = exeICON, gui_only = True,)]
|
APP = [bdist_esky.Executable("Desktop.py", name = NAME, icon = exeICON, gui_only = True,)]
|
||||||
@@ -96,4 +101,7 @@ setup(
|
|||||||
options = dict(bdist_esky = ESKY_OPTIONS),
|
options = dict(bdist_esky = ESKY_OPTIONS),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
distpath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dist')
|
||||||
|
zipfilename = os.path.join(distpath, '%s-%s.%s' % (NAME, version.VERSION, file_ext))
|
||||||
|
zfile = zipfile.ZipFile(zipfilename, "r")
|
||||||
|
zfile.extractall(distpath)
|
||||||
Reference in new issue
Block a user