1 | ############################################################################ |
---|
2 | # |
---|
3 | # SAGE UI - A Graphical User Interface for SAGE |
---|
4 | # Copyright (C) 2005 Electronic Visualization Laboratory, |
---|
5 | # University of Illinois at Chicago |
---|
6 | # |
---|
7 | # All rights reserved. |
---|
8 | # |
---|
9 | # Redistribution and use in source and binary forms, with or without |
---|
10 | # modification, are permitted provided that the following conditions are met: |
---|
11 | # |
---|
12 | # * Redistributions of source code must retain the above copyright |
---|
13 | # notice, this list of conditions and the following disclaimer. |
---|
14 | # * Redistributions in binary form must reproduce the above |
---|
15 | # copyright notice, this list of conditions and the following disclaimer |
---|
16 | # in the documentation and/or other materials provided with the distribution. |
---|
17 | # * Neither the name of the University of Illinois at Chicago nor |
---|
18 | # the names of its contributors may be used to endorse or promote |
---|
19 | # products derived from this software without specific prior written permission. |
---|
20 | # |
---|
21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
---|
22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
---|
23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
---|
24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
---|
25 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
---|
26 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
---|
27 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
---|
28 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
---|
29 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
---|
30 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
---|
31 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
32 | # |
---|
33 | # Direct questions, comments etc about SAGE UI to www.evl.uic.edu/cavern/forum |
---|
34 | # |
---|
35 | # Author: Ratko Jagodic |
---|
36 | # |
---|
37 | ############################################################################ |
---|
38 | |
---|
39 | |
---|
40 | """ |
---|
41 | A distutils script to make a standalone .exe of superdoodle for |
---|
42 | Windows platforms. You can get py2exe from |
---|
43 | http://py2exe.sourceforge.net/. Use this command to build the .exe |
---|
44 | and collect the other needed files: |
---|
45 | |
---|
46 | python setup.py py2exe |
---|
47 | |
---|
48 | A distutils script to make a standalone .app of superdoodle for |
---|
49 | Mac OS X. You can get py2app from http://undefined.org/python/py2app. |
---|
50 | Use this command to build the .app and collect the other needed files: |
---|
51 | |
---|
52 | python setup.py py2app |
---|
53 | """ |
---|
54 | |
---|
55 | |
---|
56 | #### this is used for building on Windows |
---|
57 | #### without this we'll get some ugly looking controls |
---|
58 | |
---|
59 | manifest = """ |
---|
60 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
---|
61 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" |
---|
62 | manifestVersion="1.0"> |
---|
63 | <assemblyIdentity |
---|
64 | version="0.64.1.0" |
---|
65 | processorArchitecture="x86" |
---|
66 | name="Controls" |
---|
67 | type="win32" |
---|
68 | /> |
---|
69 | <description>SAGE UI</description> |
---|
70 | <dependency> |
---|
71 | <dependentAssembly> |
---|
72 | <assemblyIdentity |
---|
73 | type="win32" |
---|
74 | name="Microsoft.Windows.Common-Controls" |
---|
75 | version="6.0.0.0" |
---|
76 | processorArchitecture="X86" |
---|
77 | publicKeyToken="6595b64144ccf1df" |
---|
78 | language="*" |
---|
79 | /> |
---|
80 | </dependentAssembly> |
---|
81 | </dependency> |
---|
82 | </assembly> |
---|
83 | """ |
---|
84 | |
---|
85 | #### end windows crap |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | VERSION = "3.0" |
---|
91 | NAME = "sageui" |
---|
92 | DESCRIPTION = "SAGE UI v"+str(VERSION) |
---|
93 | |
---|
94 | from distutils.core import setup, Distribution |
---|
95 | import sys, glob |
---|
96 | |
---|
97 | |
---|
98 | ##### MAC ###### |
---|
99 | # RUN WITH: python setup.py py2app --site-packages |
---|
100 | # |
---|
101 | if sys.platform == 'darwin': |
---|
102 | import py2app |
---|
103 | opts = dict(argv_emulation=True, |
---|
104 | iconfile="images/sageUIIcon.icns", |
---|
105 | dist_dir="sageui") |
---|
106 | setup(app=['sageui.py'], |
---|
107 | name = NAME, |
---|
108 | options=dict(py2app=opts), |
---|
109 | data_files = [(".", ["README","RECENT_CHANGES", "images", "prefs"]), |
---|
110 | ("images", glob.glob("images\\*.*")), |
---|
111 | ("prefs", glob.glob("prefs\\*.*"))], |
---|
112 | ) |
---|
113 | |
---|
114 | |
---|
115 | ##### WINDOWS ###### |
---|
116 | # RUN WITH: python setup.py py2exe -b 1 |
---|
117 | # |
---|
118 | |
---|
119 | elif sys.platform == 'win32': |
---|
120 | import py2exe |
---|
121 | opts = dict(dist_dir="sageui") |
---|
122 | setup(windows=[{"script":"sageui.py"}], |
---|
123 | #"other_resources": [(24,1,manifest)] |
---|
124 | #}], |
---|
125 | name = NAME, |
---|
126 | version = str(VERSION), |
---|
127 | description = DESCRIPTION, |
---|
128 | options=dict(py2exe=opts), |
---|
129 | data_files = [(".", ["README", "RECENT_CHANGES", "gdiplus.dll", "MSVCP90.dll", "msvcr90.dll"]), |
---|
130 | ("images", glob.glob("images\\*.*")), |
---|
131 | ("prefs", glob.glob("prefs\\*.*"))], |
---|
132 | ) |
---|
133 | |
---|
134 | |
---|
135 | |
---|
136 | |
---|