Commits

Brendan Howell  committed 287d48d

started changes to setup.py for unix/linux

  • Participants
  • Parent commits f6f668b

Comments (0)

Files changed (2)

File examples/wrappingpaper-cir.jpg

Old
Old image
New
New image
 """
-This is a setup.py script generated by py2applet
+This is a setup.py script for PyCessing
 
 Usage:
     python setup.py py2app
 """
-
-from setuptools import setup
+import sys
+from setuptools import setup, find_packages
 
 APP = ['pycessing.py']
 DATA_FILES = []
-OPTIONS = {'argv_emulation': True, 
-		'includes': ['sip','PyQt4','PyQt4.QtGui','PyQt4.QtCore','pygame',
+VERSION = "0.3"
+
+MAC_OPTIONS = {'argv_emulation': True, 
+		       'includes': ['sip','PyQt4','PyQt4.QtGui','PyQt4.QtCore','pygame',
 		             'numpy','Image','cairo','json','xml.dom.minidom'],
-		'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL',
+		        'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL',
 		             'PyQt4.QtScript', 'PyQt4.QtSql', 'PyQt4.QtTest', 
 					 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon']}
 
+if sys.platform == "darwin":
+    extra_options = dict(
+        app=APP,
+        data_files=DATA_FILES,
+        options={'py2app': MAC_OPTIONS},
+        setup_requires=['py2app'],
+	)
+elif sys.platform == 'win32':
+     extra_options = dict(
+         setup_requires=['py2exe'],
+         app=[APP],
+     )
+else:
+     extra_options = dict(
+         scripts = APP,
+         #packages = ["mainwindow.py","run.py"],
+         py_modules = ["mainwindow","run"],
+         version = VERSION,
+         author = "Brendan Howell",
+         author_email = "brendan@pycessing.org",
+         license = "GPLv3",
+         url = "http://pycessing.org",
+         classifiers = [
+            "Development Status :: 4 - Beta",
+         ],
+     )
+
 setup(
-    app=APP,
-    data_files=DATA_FILES,
-    options={'py2app': OPTIONS},
-    setup_requires=['py2app'],
+    name="PyCessing",
+    **extra_options
 )