2013-02-16 19:02:05 +01:00
|
|
|
import sys, setuptools
|
|
|
|
|
|
|
|
opzioni = {
|
|
|
|
"name": "Dropchat",
|
|
|
|
"version": "1.0",
|
|
|
|
"description": "Chat tramite dropbox.",
|
|
|
|
"author": "Rnhmjoj",
|
|
|
|
"author_email": "micheleguerinirocco@me.com",
|
|
|
|
"license": "MIT-GPL",
|
|
|
|
"app": ["Dropchat.py"],
|
|
|
|
"data_files": ["preferenze.json"],
|
|
|
|
"options": {},
|
2013-02-16 19:12:45 +01:00
|
|
|
"setup_requires": [],
|
2013-02-16 19:02:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if sys.platform == "darwin":
|
|
|
|
try:
|
|
|
|
import py2app
|
|
|
|
sys.argv += "py2app",
|
|
|
|
opzioni["options"] = {"py2app": {"argv_emulation": False}}
|
2013-02-16 19:12:45 +01:00
|
|
|
opzioni["setup_requires"] += "py2app",
|
2013-02-16 19:02:05 +01:00
|
|
|
except ImportError:
|
|
|
|
exit("py2app non installato.")
|
|
|
|
|
|
|
|
elif sys.platform == "win32":
|
|
|
|
try:
|
|
|
|
import py2exe
|
|
|
|
sys.argv += "py2exe",
|
|
|
|
opzioni["options"] = {"py2exe": {"bundle_files": 1, "compressed": True}}
|
2013-02-16 19:12:45 +01:00
|
|
|
opzioni["setup_requires"] += "py2exe",
|
2013-02-16 19:02:05 +01:00
|
|
|
except ImportError:
|
|
|
|
exit("py2exe non installato.")
|
|
|
|
|
|
|
|
else:
|
|
|
|
exit("Sistema non supportato")
|
|
|
|
|
|
|
|
setuptools.setup(**opzioni)
|