Lines 40-138
Link Here
|
40 |
from distutils.core import setup |
40 |
from distutils.core import setup |
41 |
from Scribes.info import version |
41 |
from Scribes.info import version |
42 |
|
42 |
|
43 |
|
|
|
44 |
def check_dependencies(): |
45 |
u""" |
46 |
Check for Scribes' runtime software dependencies. |
47 |
|
48 |
The function aborts the installation process if runtime software |
49 |
dependencies are not met by the host system. |
50 |
""" |
51 |
|
52 |
if version_info[:3] < (2, 4, 0): |
53 |
|
54 |
print "You need Python version 2.4 or later to run Scribes." |
55 |
exit(1) |
56 |
|
57 |
try: |
58 |
|
59 |
import gdbm |
60 |
|
61 |
except ImportError: |
62 |
|
63 |
print "You need Python version 2.4 compiled with gdbm to run Scribes." |
64 |
exit(1) |
65 |
|
66 |
try: |
67 |
|
68 |
import gtk |
69 |
|
70 |
if gtk.pygtk_version < (2, 8, 0): |
71 |
|
72 |
raise ImportError |
73 |
|
74 |
except ImportError: |
75 |
|
76 |
print "You need PyGTK version 2.8 or later to run Scribes." |
77 |
exit(1) |
78 |
|
79 |
try: |
80 |
|
81 |
import gnome |
82 |
|
83 |
if gnome.gnome_python_version < (2, 12, 0): |
84 |
|
85 |
raise ImportError |
86 |
|
87 |
except ImportError: |
88 |
|
89 |
print "You need GNOME Python version 2.12 or later to run Scribes" |
90 |
exit(1) |
91 |
|
92 |
try: |
93 |
|
94 |
import gtksourceview |
95 |
|
96 |
except ImportError: |
97 |
|
98 |
print "You need the gtksourceview module in GNOME Python Extras version" |
99 |
print " 2.12 or later to run Scribes." |
100 |
exit(1) |
101 |
|
102 |
try: |
103 |
|
104 |
import gtkspell |
105 |
|
106 |
except ImportError: |
107 |
|
108 |
print "You need the gtkspell module in GNOME Python Extras version" |
109 |
print " 2.12 or later to run Scribes." |
110 |
exit(1) |
111 |
|
112 |
# Check to see if Yelp is installed on the host system |
113 |
|
114 |
cmd = "which yelp" |
115 |
err, out = getstatusoutput(cmd) |
116 |
|
117 |
if err: |
118 |
|
119 |
print "You need Yelp version 2.12 or later to run Scribes." |
120 |
exit(1) |
121 |
|
122 |
# Check to see if GConf is installed on the host system |
123 |
|
124 |
cmd = "which gconftool-2" |
125 |
err, out = getstatusoutput(cmd) |
126 |
|
127 |
if err: |
128 |
|
129 |
print "You need GConf version 2.12 or later to run Scribes." |
130 |
exit(1) |
131 |
|
132 |
return |
133 |
|
134 |
check_dependencies() |
135 |
|
136 |
# Trove classification |
43 |
# Trove classification |
137 |
|
44 |
|
138 |
classifiers = """ |
45 |
classifiers = """ |
Lines 190-240
Link Here
|
190 |
], |
97 |
], |
191 |
scripts=["scribes"],) |
98 |
scripts=["scribes"],) |
192 |
|
99 |
|
193 |
|
|
|
194 |
################################################################################ |
195 |
# |
196 |
# GConf Installation |
197 |
# |
198 |
################################################################################ |
199 |
|
200 |
# Get gconf's default source |
201 |
|
202 |
cmd = "gconftool-2 --get-default-source" |
203 |
err, out = getstatusoutput(cmd) |
204 |
|
205 |
# Set up the gconf environment variable. |
206 |
|
207 |
putenv('GCONF_CONFIG_SOURCE', out) |
208 |
|
209 |
# Install gconf to the default source |
210 |
|
211 |
cmd = "gconftool-2 --makefile-install-rule data/scribes.schemas" |
212 |
err, out = getstatusoutput(cmd) |
213 |
|
214 |
if out: |
215 |
|
216 |
print "installing GConf schema files" |
217 |
|
218 |
if err: |
219 |
|
220 |
print 'Error: installation of gconf schema files failed: %s' % out |
221 |
|
222 |
# Kill the GConf daemon |
223 |
|
224 |
cmd = "killall gconfd-2" |
225 |
err, out = getstatusoutput(cmd) |
226 |
|
227 |
if err: |
228 |
|
229 |
print "Problem shutting down gconf." |
230 |
|
231 |
# Start the GConf daemon |
232 |
|
233 |
cmd = "gconftool-2 --spawn" |
234 |
err, out = getstatusoutput(cmd) |
235 |
|
236 |
if err: |
237 |
|
238 |
print "Problem restarting down gconf." |
239 |
|
240 |
print "scribes installation complete" |
100 |
print "scribes installation complete" |