+
+#----------------------------------------------------------------------
+# Other variables used below
+
+%define pref %{_prefix}
+%define python /usr/bin/python%{pyver}
+%define tarname @TARNAME@
+%define version @VERSION@
+%define ver2 @VER2@
+
+%define chartype %(if [ "%{unicode}" = "1" ]; then echo unicode; else echo ansi; fi)
+%define gtktype %(if [ "%{port}" = "gtk2" ]; then echo 2; fi)
+%define using_gtk1 %(if [ "%{port}" = "gtk" ]; then echo 1; else echo 0; fi)
+
+%define wxprefbase %{pref}/lib/wxPython
+%define wxpref %{wxprefbase}-%{version}-%{port}-%{chartype}
+%define pkgname wxPython
+
+# turn off the generation of debuginfo rpm (RH9) ??
+%define debug_package %{nil}
+
+
+#----------------------------------------------------------------------
+# Package definition
+#----------------------------------------------------------------------
+Name: %{pkgname}%{ver2}
+Summary: Cross platform GUI toolkit for Python
+Version: %{version}
+Release: %{release}
+Source0: %{tarname}-%{version}.tar.bz2
+License: wx Library Licence, Version 3
+URL: http://wxPython.org/
+Packager: Robin Dunn <robin@alldunn.com>
+Group: Development/Python
+BuildRoot: %{_tmppath}/%{pkgname}-buildroot
+Prefix: %{pref}
+
+%description
+Cross platform GUI toolkit for Python
+
+
+
+
+%package -n %{pkgname}%{ver2}-%{port}-%{chartype}
+Summary: Cross platform GUI toolkit for Python
+Group: Development/Python
+Requires: %{pkgname}-common
+Obsoletes: wxPythonGTK%{gtktype}-py%{pyver}, wxPythonGTK%{gtktype}
+Provides: wxPython
+
+
+%description -n %{pkgname}%{ver2}-%{port}-%{chartype}
+wxPython is a GUI toolkit for the Python programming language. It
+allows Python programmers to create programs with a robust, highly
+functional graphical user interface, simply and easily. It is
+implemented as a Python extension module (native code) that wraps the
+popular wxWidgets cross platform GUI library, which is written in C++.
+
+wxPython is a cross-platform toolkit. The same program will usually
+run on multiple platforms without modification. Currently supported
+platforms are 32-bit Microsoft Windows, most Unix or unix-like
+systems, and Macintosh OS X.
+
+This package contains the wxPython runtime files built for the
+wxWidgets %{port} port with %{chartype} character type.
+
+
+
+
+
+%package -n %{pkgname}-common-%{port}-%{chartype}
+Summary: Common files for needed by all wxPython runtimes
+Group: Development/Python
+Provides: %{pkgname}-common
+
+# They obsolete each other so any of them can be installed over another
+# without conflicts
+Obsoletes: %{pkgname}-common-gtk-ansi
+Obsoletes: %{pkgname}-common-gtk2-ansi
+Obsoletes: %{pkgname}-common-gtk2-unicode
+
+%description -n %{pkgname}-common-%{port}-%{chartype}
+This package contains the common files needed by any version of the
+wxPython runtime. This pacakge also installs a wx.pth file which will
+determine which of the installed runtimes is the default version of
+wxPython that is imported automatically with a bare "import wx".