source: trunk/src/testing/ui/setup.py @ 4

Revision 4, 4.4 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
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"""
41A distutils script to make a standalone .exe of superdoodle for
42Windows platforms.  You can get py2exe from
43http://py2exe.sourceforge.net/.  Use this command to build the .exe
44and collect the other needed files:
45
46    python setup.py py2exe
47
48A distutils script to make a standalone .app of superdoodle for
49Mac OS X.  You can get py2app from http://undefined.org/python/py2app.
50Use 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
59manifest = """
60<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
61<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
62manifestVersion="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
90VERSION = "3.0"
91NAME = "sageui"
92DESCRIPTION = "SAGE UI v"+str(VERSION)
93
94from distutils.core import setup, Distribution
95import sys, glob
96
97
98#####    MAC   ######
99# RUN WITH: python setup.py py2app --site-packages
100#
101if 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
119elif 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
Note: See TracBrowser for help on using the repository browser.