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