PkgConfigExtension, Template, TemplateExtension, \ BuildExt, InstallLib, InstallData except ImportError: raise SystemExit('ERROR: Could not import dsextras module: ' 'Make sure you have installed pygobject.') # Check for pkgconfig if not have_pkgconfig(): raise SystemExit('ERROR: Could not find pkg-config: ' 'Please check your PATH environment variable.') PYGTK_SUFFIX = '2.0' PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX PYGTK_DEFS_DIR = pkgc_get_defs_dir('pygtk-%s' % PYGTK_SUFFIX) GOOCANVAS_REQUIRED = get_m4_define('goocanvas_required_version') PYCAIRO_REQUIRED = get_m4_define('pycairo_required_version') PYGOBJECT_REQUIRED = get_m4_define('pygobject_required_version') PYGTK_REQUIRED = get_m4_define('pygtk_required_version') MAJOR_VERSION = int(get_m4_define('pygoocanvas_major_version')) MINOR_VERSION = int(get_m4_define('pygoocanvas_minor_version')) MICRO_VERSION = int(get_m4_define('pygoocanvas_micro_version')) VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GLOBAL_INC += ['.'] GLOBAL_MACROS += [('PYGOOCANVAS_MAJOR_VERSION', MAJOR_VERSION), ('PYGOOCANVAS_MINOR_VERSION', MINOR_VERSION), ('PYGOOCANVAS_MICRO_VERSION', MICRO_VERSION), ('VERSION', '\\"%s\\"' % VERSION), ('PLATFORM_WIN32', 1),
PkgConfigExtension, Template, TemplateExtension, \ BuildExt, InstallLib, InstallData except ImportError: raise SystemExit('ERROR: Could not import dsextras module: ' 'Make sure you have installed pygobject.') # Check for pkgconfig if not have_pkgconfig(): raise SystemExit('ERROR: Could not find pkg-config: ' 'Please check your PATH environment variable.') PYGTK_SUFFIX = '2.0' PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX PYGOBJECT_DEFSDIR = pkgc_get_defs_dir('pygobject-%s' % PYGTK_SUFFIX) GOBJECT_REQUIRED = get_m4_define('glib_required_version') ATK_REQUIRED = get_m4_define('atk_required_version') PANGO_REQUIRED = get_m4_define('pango_required_version') GTK_REQUIRED = get_m4_define('gtk_required_version') LIBGLADE_REQUIRED = get_m4_define('libglade_required_version') PYCAIRO_REQUIRED = get_m4_define('pycairo_required_version') PYGOBJECT_REQUIRED = get_m4_define('pygobject_required_version') MAJOR_VERSION = int(get_m4_define('pygtk_major_version')) MINOR_VERSION = int(get_m4_define('pygtk_minor_version')) MICRO_VERSION = int(get_m4_define('pygtk_micro_version')) VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GLOBAL_INC += ['.', 'gtk'] GLOBAL_MACROS += [('PYGTK_MAJOR_VERSION', MAJOR_VERSION), ('PYGTK_MINOR_VERSION', MINOR_VERSION),
MIN_PYTHON_VERSION = (2, 6, 0) if sys.version_info[:3] < MIN_PYTHON_VERSION: raise SystemExit('ERROR: Python %s or higher is required, %s found.' % ( '.'.join(map(str, MIN_PYTHON_VERSION)), '.'.join(map(str, sys.version_info[:3])))) if not have_pkgconfig(): raise SystemExit('ERROR: Could not find pkg-config: ' 'Please check your PATH environment variable.') PYGTK_SUFFIX = '2.0' PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX GLIB_REQUIRED = get_m4_define('glib_required_version') MAJOR_VERSION = int(get_m4_define('pygobject_major_version')) MINOR_VERSION = int(get_m4_define('pygobject_minor_version')) MICRO_VERSION = int(get_m4_define('pygobject_micro_version')) VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GLOBAL_INC += ['gobject'] GLOBAL_MACROS += [('PYGOBJECT_MAJOR_VERSION', MAJOR_VERSION), ('PYGOBJECT_MINOR_VERSION', MINOR_VERSION), ('PYGOBJECT_MICRO_VERSION', MICRO_VERSION), ('VERSION', '\\"%s\\"' % VERSION)] BIN_DIR = os.path.join('Scripts') INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGTK_SUFFIX) DEFS_DIR = os.path.join('share', 'pygobject', PYGTK_SUFFIX, 'defs')
print 'Building PyGTK using distutils is NOT SUPPORTED.' print "It's mainly included to be able to easily build win32 installers" print "You may continue, but only if you agree to not ask any questions" print "To build PyGTK in a supported way, read the INSTALL file" print print "Build fixes are of course welcome and should be filed in bugzilla" print '*'*70 input = raw_input('Not supported, ok [y/N]? ') if not input.startswith('y'): raise SystemExit if sys.version_info[:3] < (2, 3, 5): raise SystemExit, \ "Python 2.3.5 or higher is required, %d.%d.%d found" % sys.version_info[:3] MAJOR_VERSION = int(get_m4_define('pygtk_major_version')) MINOR_VERSION = int(get_m4_define('pygtk_minor_version')) MICRO_VERSION = int(get_m4_define('pygtk_micro_version')) VERSION = "%d.%d.%d" % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GOBJECT_REQUIRED = get_m4_define('glib_required_version') ATK_REQUIRED = get_m4_define('atk_required_version') PANGO_REQUIRED = get_m4_define('pango_required_version') GTK_REQUIRED = get_m4_define('gtk_required_version') LIBGLADE_REQUIRED = get_m4_define('libglade_required_version') PYCAIRO_REQUIRED = get_m4_define('pycairo_required_version') PYGTK_SUFFIX = '2.0' PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX
BuildExt, InstallLib, InstallData except ImportError: raise SystemExit('ERROR: Could not import dsextras module: ' 'Make sure you have installed pygobject.') # Check for pkgconfig if not have_pkgconfig(): raise SystemExit('ERROR: Could not find pkg-config: ' 'Please check your PATH environment variable.') PYGTK_SUFFIX = '2.0' PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX PYGTK_DEFS_DIR = pkgc_get_defs_dir('pygtk-%s' % PYGTK_SUFFIX) GTKSOURCEVIEW_REQUIRED = get_m4_define('gtksourceview_required_version') PYGOBJECT_REQUIRED = get_m4_define('pygobject_required_version') PYGTK_REQUIRED = get_m4_define('pygtk_required_version') MAJOR_VERSION = int(get_m4_define('pygtksourceview_major_version')) MINOR_VERSION = int(get_m4_define('pygtksourceview_minor_version')) MICRO_VERSION = int(get_m4_define('pygtksourceview_micro_version')) VERSION = '%d.%d.%d' % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GLOBAL_INC += ['.'] GLOBAL_MACROS += [('PYGTKSOURCEVIEW_MAJOR_VERSION', MAJOR_VERSION), ('PYGTKSOURCEVIEW_MINOR_VERSION', MINOR_VERSION), ('PYGTKSOURCEVIEW_MICRO_VERSION', MICRO_VERSION), ('VERSION', '\\"%s\\"' % VERSION), ('PLATFORM_WIN32', 1), ('HAVE_BIND_TEXTDOMAIN_CODESET', 1)]
InstallLib, InstallData, ) except ImportError: raise SystemExit("ERROR: Could not import dsextras module: " "Make sure you have installed pygobject.") # Check for pkgconfig if not have_pkgconfig(): raise SystemExit("ERROR: Could not find pkg-config: " "Please check your PATH environment variable.") PYGTK_SUFFIX = "2.0" PYGTK_SUFFIX_LONG = "gtk-" + PYGTK_SUFFIX PYGTK_DEFS_DIR = pkgc_get_defs_dir("pygtk-%s" % PYGTK_SUFFIX) RSVG_REQUIRED = get_m4_define("rsvg_required_version") PYCAIRO_REQUIRED = "1.8.10" # configure.ac does not define pycairo_required_version PYGTK_REQUIRED = "%s.%s.%s" % ( get_m4_define("pygtk_required_major_version"), get_m4_define("pygtk_required_minor_version"), get_m4_define("pygtk_required_micro_version"), ) MAJOR_VERSION = int(get_m4_define("gnome_python_desktop_major_version")) MINOR_VERSION = int(get_m4_define("gnome_python_desktop_minor_version")) MICRO_VERSION = int(get_m4_define("gnome_python_desktop_micro_version")) VERSION = "%d.%d.%d" % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) GLOBAL_INC += ["."] GLOBAL_MACROS += [ ("PYRSVG_MAJOR_VERSION", MAJOR_VERSION),