Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 106964 | Differences between
and this patch

Collapse All | Expand All

(-)setup.py (-149 lines)
Lines 41-146 Link Here
41
from Scribes.info import version
41
from Scribes.info import version
42
42
43
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 pygtk
69
		pygtk.require("2.0")
70
		import gtk
71
72
		if gtk.pygtk_version < (2, 8, 0):
73
74
			raise ImportError
75
76
	except ImportError:
77
78
		print "You need PyGTK version 2.8 or later to run Scribes."
79
		exit(1)
80
81
    try:
82
83
		import pygtk
84
		pygtk.require("2.0")
85
		import gnome
86
87
		if gnome.gnome_python_version < (2, 12, 0):
88
89
			raise ImportError
90
91
    except ImportError:
92
93
    	print "You need GNOME Python version 2.12 or later to run Scribes"
94
        exit(1)
95
96
    try:
97
98
		import pygtk
99
		pygtk.require("2.0")
100
		import gtksourceview
101
102
    except ImportError:
103
104
        print "You need the gtksourceview module in GNOME Python Extras version"
105
        print " 2.12 or later to run Scribes."
106
        exit(1)
107
108
	try:
109
110
		import pygtk
111
		pygtk.require("2.0")
112
		import gtkspell
113
114
	except ImportError:
115
116
		print "You need the gtkspell module in GNOME Python Extras version"
117
        print " 2.12 or later to run Scribes."
118
        exit(1)
119
120
    # Check to see if Yelp is installed on the host system
121
122
	cmd = "which yelp"
123
	err, out = getstatusoutput(cmd)
124
125
	if err:
126
127
		print "You need Yelp version 2.12 or later to run Scribes."
128
		exit(1)
129
130
	# Check to see if GConf is installed on the host system
131
132
	cmd = "which gconftool-2"
133
	err, out = getstatusoutput(cmd)
134
135
	if err:
136
137
		print "You need GConf version 2.12 or later to run Scribes."
138
		exit(1)
139
140
	return
141
142
check_dependencies()
143
144
# Trove classification
44
# Trove classification
145
45
146
classifiers = """
46
classifiers = """
Lines 198-249 Link Here
198
			 "data/scribes_editing.png", "data/scribes_status.png"])
98
			 "data/scribes_editing.png", "data/scribes_status.png"])
199
	],
99
	],
200
	scripts=["scribes"],)
100
	scripts=["scribes"],)
201
202
203
################################################################################
204
#
205
#							GConf Installation
206
#
207
################################################################################
208
209
# Get gconf's default source
210
211
cmd = "gconftool-2 --get-default-source"
212
err, out = getstatusoutput(cmd)
213
214
# Set up the gconf environment variable.
215
216
putenv('GCONF_CONFIG_SOURCE', out)
217
218
# Install gconf to the default source
219
220
cmd = "gconftool-2 --makefile-install-rule data/scribes.schemas"
221
err, out = getstatusoutput(cmd)
222
223
if out:
224
225
    print "installing GConf schema files"
226
227
if err:
228
229
    print 'Error: installation of gconf schema files failed: %s' % out
230
231
# Kill the GConf daemon
232
233
cmd = "killall gconfd-2"
234
err, out = getstatusoutput(cmd)
235
236
if err:
237
238
	print "Problem shutting down gconf."
239
240
# Start the GConf daemon
241
242
cmd = "gconftool-2 --spawn"
243
err, out = getstatusoutput(cmd)
244
245
if err:
246
247
	print "Problem restarting down gconf."
248
249
print "scribes installation complete"

Return to bug 106964