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

Return to bug 106964