--- setup.py 2005-11-08 17:49:04.698990160 -0500 +++ setup_new.py 2005-11-09 08:23:36.638821728 -0500 @@ -20,7 +20,7 @@ u""" Installation script for Scribes. -This module installs Scribes' data files and modules on the host system. +This module installs Scribes' data files and modules on the host system. Software dependency checks are also performed to ensure that the host system has all the required software to run Scribes. @@ -34,105 +34,9 @@ @contact: mystilleef@gmail.com """ -from sys import version_info, exit -from os import putenv -from commands import getstatusoutput from distutils.core import setup - -def check_dependencies(): - u""" - Check for Scribes' runtime software dependencies. - - The function aborts the installation process if runtime software - dependencies are not met by the host system. - """ - - if version_info[:3] < (2, 4, 0): - - print "You need Python version 2.4 or later to run Scribes." - exit(1) - - try: - - import gdbm - - except ImportError: - - print "You need Python version 2.4 compiled with gdbm to run Scribes." - exit(1) - - try: - - import gtk - - if gtk.pygtk_version < (2, 8, 0): - - raise ImportError - - except ImportError: - - print "You need PyGTK version 2.8 or later to run Scribes." - exit(1) - - try: - - import gnome - - if gnome.gnome_python_version < (2, 12, 0): - - raise ImportError - - except ImportError: - - print "You need GNOME Python version 2.12 or later to run Scribes" - exit(1) - - try: - - import gtksourceview - - except ImportError: - - print "You need the gtksourceview module in GNOME Python Extras version" - print " 2.12 or later to run Scribes." - exit(1) - - try: - - import gtkspell - - except ImportError: - - print "You need the gtkspell module in GNOME Python Extras version" - print " 2.12 or later to run Scribes." - exit(1) - - # Check to see if Yelp is installed on the host system - - cmd = "which yelp" - err, out = getstatusoutput(cmd) - - if err: - - print "You need Yelp version 2.12 or later to run Scribes." - exit(1) - - # Check to see if GConf is installed on the host system - - cmd = "which gconftool-2" - err, out = getstatusoutput(cmd) - - if err: - - print "You need GConf version 2.12 or later to run Scribes." - exit(1) - - return - -check_dependencies() - -# Trove classification +# Trove classification classifiers = """ Development Status :: 1 - Alpha @@ -151,7 +55,7 @@ Topic :: Software Development Topic :: Text Editors -""" +""" ################################################################################ @@ -172,7 +76,7 @@ license="GNU GPL v2 and above", packages=["Scribes"], data_files=[("share/applications", ["data/scribes.desktop"]), - ("share/application-registry", + ("share/application-registry", ["data/scribes.application"]), ("share/scribes/", ["data/scribes_toolbar_ui.xml"]), ("share/gnome/help/scribes/C", ["data/scribes.xml"]), @@ -180,56 +84,7 @@ ("share/locale/ru/LC_MESSAGES/",["data/po/ru/scribes.mo"]), ("share/locale/pt_BR/LC_MESSAGES/",["data/po/pt_BR/scribes.mo"]), ("share/omf/scribes", ["data/scribes-C.omf"]), - ("share/gnome/help/scribes/C/figures", + ("share/gnome/help/scribes/C/figures", ["data/scribes_window.png", "data/scribes_toolbar.png", "data/scribes_editing.png", "data/scribes_status.png"])], scripts=["scribes"],) - - -################################################################################ -# -# GConf Installation -# -################################################################################ - -# Get gconf's default source - -cmd = "gconftool-2 --get-default-source" -err, out = getstatusoutput(cmd) - -# Set up the gconf environment variable. - -putenv('GCONF_CONFIG_SOURCE', out) - -# Install gconf to the default source - -cmd = "gconftool-2 --makefile-install-rule data/scribes.schemas" -err, out = getstatusoutput(cmd) - -if out: - - print "installing GConf schema files" - -if err: - - print 'Error: installation of gconf schema files failed: %s' % out - -# Kill the GConf daemon - -cmd = "killall gconfd-2" -err, out = getstatusoutput(cmd) - -if err: - - print "Problem shutting down gconf." - -# Start the GConf daemon - -cmd = "gconftool-2 --spawn" -err, out = getstatusoutput(cmd) - -if err: - - print "Problem restarting down gconf." - -print "scribes installation complete"