Blob Blame Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define buildflags WXPORT=gtk2 UNICODE=1

Name:           wxPython
Release:        1%{?dist}

Summary:        GUI toolkit for the Python programming language

Group:          Development/Languages
License:        LGPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  wxGTK-devel = 2.6.3, pkgconfig
BuildRequires:  zlib-devel, libpng-devel, libjpeg-devel, libtiff-devel
BuildRequires:  libGL-devel, libGLU-devel
BuildRequires:  python-devel, wxGTK-gl

# packages should depend on "wxPython", not "wxPythonGTK2", but in case
# one does, here's the provides for it.
Provides:       wxPythonGTK2 = %{version}-%{release}

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 wxWindows cross
platform GUI library, which is written in C++.

%package        devel
Group:          Development/Libraries
Summary:        Development files for wxPython add-on modules
Requires:       %{name} = %{version}-%{release}
Requires:       wxGTK-devel

%description devel
This package includes C++ header files and SWIG files needed for developing
add-on modules for wxPython. It is NOT needed for development of most
programs which use the wxPython toolkit.

%setup -q -n wxPython-src-%{version}

# Just build the wxPython part, not all of wxWindows which we already have
# in Fedora
cd wxPython
# included distutils is not multilib aware; use normal
rm -rf distutils
python %{buildflags} build

cd wxPython
python %{buildflags} install --root=$RPM_BUILD_ROOT

# this is a kludge....
%if "%{python_sitelib}" != "%{python_sitearch}"
mv $RPM_BUILD_ROOT%{python_sitelib}/wx.pth  $RPM_BUILD_ROOT%{python_sitearch}
mv $RPM_BUILD_ROOT%{python_sitelib}/* $RPM_BUILD_ROOT%{python_sitearch}


%doc wxPython/docs wxPython/demo wxPython/licence/ wxPython/samples
%dir %{python_sitearch}/wx-2.6-gtk2-unicode/

%files devel
%dir %{_includedir}/wx-2.6/wx/wxPython
%dir %{_includedir}/wx-2.6/wx/wxPython/i_files

* Thu Apr 13 2006 Matthew Miller <> -
- version
- move _into_ lib64. Apparently that's the right thing to do. :)
- upstream tarball no longer includes embedded.o (since I finally got around
  to pointing that out to the developers instead of just kludging it away.)
- buildrequires to just libGLU-devel instead of mesa-libGL-devel

* Fri Mar 31 2006 Matthew Miller <> -
- grr. bump relnumber.

* Fri Mar 31 2006 Matthew Miller <> -
- oh yeah -- not lib64.

* Fri Mar 31 2006 Matthew Miller <> -
- buildrequires mesa-libGLU-devel

* Thu Mar 30 2006 Matthew Miller <> -
- update to
- wxGTK and wxPython versions are inexorably linked; make BuildRequires
  be exact, rather than >=.
- make devel subpackage as per comment #7 in bug #163440.

* Thu Nov 24 2005 Matthew Miller <> -
- update to
- merge in changes from current extras 2.4.x package
- Happy Thanksgiving
- build animate extention again -- works now.

* Thu Apr 28 2005 Matthew Miller <> -
- get rid of accidental binaries in source tarball -- they generates
  spurious dependencies and serve no purpose
- update to and build for Velouria
- switch to Fedora Extras base spec file
- enable gtk2 and unicode and all the code stuff (as FE does)
- disable BUILD_ANIMATE extension from contrib -- doesn't build
- files are in a different location now -- adjust to that
- zap include files (needed only for building wxPython 3rd-party modules),
  because I don't think this is likely to be very useful. Other option
  would be to create a -devel package, but I think that'd be confusing.

* Tue Feb 08 2005 Thorsten Leemhuis <fedora at leemhuis dot info> 0:
- remove included disutils - it is not multilib aware; this
  fixes build on x86_64

* Tue Jan 06 2004 Panu Matilainen <> 0:
- rename package to wxPythonGTK2, provide wxPython (see bug 927)
- dont ship binaries in /usr/share

* Thu Nov 20 2003 Panu Matilainen <> 0:
- add missing buildrequires: python-devel, wxGTK2-gl

* Sun Nov 02 2003 Panu Matilainen <> 0:
- Initial RPM release.