Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > dd351a20112493a64a3f90aca8e46a47 > files > 3

wxPython-3.0.2.0-1.mga5.src.rpm

%define port    GTK
%define lcport  gtk2u
%define tarname wxPython-src

%define api 3.0
%define libname %mklibname %{name} %{api}

%define wxgtku_ver 3.0.1

Summary:   Cross platform GUI toolkit for Python using wx%{port}
Name:      wxPython
Version:   3.0.2.0
Release:   %mkrel 1
Epoch:     1
Source0:   http://prdownloads.sourceforge.net/wxpython/%{tarname}-%{version}.tar.bz2
Patch0:    wxPython-3.0.0.0-literal.patch
License:   LGPL/wxWindows Library Licence, Version 3
URL:       http://wxPython.org/
Group:     Development/Python
BuildRequires: python-devel
BuildRequires: wxgtk-devel >= %wxgtku_ver
BuildRequires: imagemagick

Provides: wxwin
# old wxPythonGTK packages
Obsoletes: wxPythonGTK < %epoch:%version
Provides: wxPythonGTK = %epoch:%{version}-%{release}
Obsoletes: wxpython2.6 <= 2.6.3.3-4
Requires: %name-wxversion = %epoch:%version-%release
Obsoletes: %{mklibname wxPythonGTK2.8} < 1:2.8.11.0-3

%description
wxPython is a GUI toolkit for Python that is a wrapper around the
wxWindows C++ GUI library.  wxPython provides a large variety of
window types and controls, all implemented with a native look and feel
(and native runtime speed) on the platforms it is supported on.

This package is implemented using the %{port} port of wxWindows.

%package wxversion
Summary: Select a specific version of %{name}
Group: Development/Python
Obsoletes: wxPythonGTK-wxversion < %epoch:%version

%description wxversion
wxPython is a GUI toolkit for Python that is a wrapper around the
wxWindows C++ GUI library.  wxPython provides a large variety of
window types and controls, all implemented with a native look and feel
(and native runtime speed) on the platforms it is supported on.

This package contains the wxversion python module needed if several versions of
wxPython are installed.

%package tools
Summary: Example applications from %{name}
Group: Development/Python
Requires: %name = %epoch:%version-%release
Obsoletes: wxPythonGTK-tools < %epoch:%version

%description tools
wxPython is a GUI toolkit for Python that is a wrapper around the
wxWindows C++ GUI library.  wxPython provides a large variety of
window types and controls, all implemented with a native look and feel
(and native runtime speed) on the platforms it is supported on.

This contains the example applications that come with wxPython like
PyShell and XRCed.

%package -n %libname-devel
Summary: Development files of %{name}
Group: Development/Python
Provides: libwxPython-devel = %epoch:%version-%release
Provides: libwxPythonGTK-devel = %epoch:%version-%release
Obsoletes: %{mklibname wxPythonGTK2.8 -d} < 1:2.8.11.0-3
Requires: %{name} = %epoch:%{version}-%release
Requires: wxgtk-devel >= %wxgtku_ver

%description -n %libname-devel
This packages contains the headers and etc. for building apps or
Python extension modules that use the same wx%{port} shared libraries
that wxPython uses.

%prep
%setup -q -n %{tarname}-%{version}/wxPython
%apply_patches

# fix libdir otherwise additional wx libs cannot be found
sed -i -e 's|/usr/lib|%{_libdir}|' config.py

%build
# (Fedora) included distutils is not multilib aware; use normal
rm -rf distutils
python setup.py \
	WXPORT='gtk2'\
	EP_ADD_OPTS=1 \
	WX_CONFIG="%_bindir/wx-config --no_rpath" \
	build

%install
python setup.py \
	WXPORT='gtk2'\
	EP_ADD_OPTS=1 \
	WX_CONFIG="%{_bindir}/wx-config --no_rpath" \
	install --root=%{buildroot}

# install Mandriva menu items
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%_real_vendor-pyshell.desktop << EOF
[Desktop Entry]
Name=PyShell
Comment=GUI Python Shell
Exec=%{_bindir}/pyshell %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;
EOF

cat > %{buildroot}%{_datadir}/applications/%_real_vendor-pycrust.desktop << EOF
[Desktop Entry]
Name=PyCrust
Comment=GUI Python Shell with Filling
Exec=%{_bindir}/pycrust %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;
EOF

cat > %{buildroot}%{_datadir}/applications/%_real_vendor-pyalamode.desktop << EOF
[Desktop Entry]
Name=PyAlaMode
Comment=GUI Python Shell with Filling and Editor Windows
Exec=%{_bindir}/pyalamode %U
Icon=PyCrust
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;
EOF

cat > %{buildroot}%{_datadir}/applications/%_real_vendor-xrced.desktop << EOF
[Desktop Entry]
Name=XRCed
Comment=XRC resource editor for wxPython
Exec=%{_bindir}/xrced %U
Icon=XRCed
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Development;
EOF

cat > %{buildroot}%{_datadir}/applications/%_real_vendor-editra.desktop << EOF
[Desktop Entry]
Name=Editra
Comment="Programmer's Text Editor"
Exec=/usr/bin/editra
Icon=editra
Terminal=false
Type=Application
Categories=GNOME;GTK;Development;
StartupNotify=true
EOF

#icons
#cd wxPython
mkdir -p %buildroot%_miconsdir
install -m 644 wx/py/PyCrust_16.png %{buildroot}%_miconsdir/PyCrust.png
install -m 644 wx/py/PyCrust_32.png %{buildroot}%_iconsdir/PyCrust.png
install -m 644 wx/tools/XRCed/XRCed_16.png %{buildroot}%{_miconsdir}/XRCed.png
install -m 644 wx/tools/XRCed/XRCed_32.png %{buildroot}%{_iconsdir}/XRCed.png

mkdir -p %buildroot%_iconsdir/hicolor/{16x16,32x32,64x64,128x128}/apps
convert -scale 16x16 wx/tools/Editra/pixmaps/editra.png %{buildroot}%_iconsdir/hicolor/16x16/apps/editra.png
convert -scale 32x32 wx/tools/Editra/pixmaps/editra.png %{buildroot}%_iconsdir/hicolor/32x32/apps/editra.png
convert -scale 64x64 wx/tools/Editra/pixmaps/editra.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/editra.png
install -m 644 wx/tools/Editra/pixmaps/editra.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/editra.png

#gw fix paths
%if %_lib != lib
mv %buildroot%py_puresitedir/* %buildroot%py_platsitedir
%endif

# don't ship these ones, firstly we have python >= 2.7, and secondly they mess
# with the pythoneggs.py auto-requires generation
%if "%{pyver}" >= "2.7"
rm -fr %buildroot%py_platsitedir/wx-%{api}-gtk2/wx/tools/Editra/plugins/{*py2.5.egg,*py2.6.egg}
%endif

%files
%doc docs/*.*
%doc docs/screenshots
%py_platsitedir/wx.pth
%py_platsitedir/*.egg-info
%dir %py_platsitedir/wx-%{api}-gtk2
%py_platsitedir/wx-%{api}-gtk2/wx
%py_platsitedir/wx-%{api}-gtk2/*.egg-info

%files tools
%_bindir/*
%_datadir/applications/%_real_vendor-*
%_iconsdir/*.png
%_miconsdir/*.png
%_iconsdir/hicolor/*/*/*.png

%files wxversion
%py_platsitedir/wxversion*

%files -n %libname-devel
%_includedir/wx-%api/wx/wxPython


%changelog
* Thu Jul 23 2015 philippem <philippem> 1:3.0.2.0-1.mga5
+ Revision: 856440
- sync with wxgtk build, update to 3.0.2.0 as python-wxWidgets version a.b.c.d wants to run with wxWidgets a.b.c.d

* Thu Nov 20 2014 wally <wally> 1:3.0.1.1-1.mga5
+ Revision: 797954
- new version 3.0.1.1

* Wed Oct 15 2014 umeabot <umeabot> 1:3.0.0.0-5.mga5
+ Revision: 742753
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 1:3.0.0.0-4.mga5
+ Revision: 730731
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 1:3.0.0.0-3.mga5
+ Revision: 690380
- Mageia 5 Mass Rebuild

  + pterjan <pterjan>
    - Rebuild for new Python

* Mon Feb 17 2014 fwang <fwang> 1:3.0.0.0-1.mga5
+ Revision: 593400
- update file list
- update file list
- more str fmt patch
- fix str fmt
- update build requires
- 3.0.0.0

* Tue Oct 22 2013 umeabot <umeabot> 1:2.8.12.1-5.mga4
+ Revision: 544711
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 1:2.8.12.1-4.mga4
+ Revision: 499998
- Rebuild to add different pythonegg provides for python 2 and 3

* Mon Feb 11 2013 fwang <fwang> 1:2.8.12.1-3.mga3
+ Revision: 397813
- update doc list
- add versioned obsoletes
- add patch to work with latest pycairo

* Mon Jan 14 2013 umeabot <umeabot> 1:2.8.12.1-2.mga3
+ Revision: 385893
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Jan 20 2012 fwang <fwang> 1:2.8.12.1-1.mga2
+ Revision: 198663
- new version 2.8.12.1

  + ahmad <ahmad>
    - Rebuild against wxgtk2.8 with enabled catch_segvs

* Tue Jun 21 2011 ahmad <ahmad> 1:2.8.12.0-1.mga2
+ Revision: 111200
- Update to 2.8.12.0
- Don't disable build the debug package (a wrong commit a couple of months ago)

* Fri Feb 25 2011 ahmad <ahmad> 1:2.8.11.0-5.mga1
+ Revision: 59947
- rebuild against wxgtk2.8 after adding more BR (to wxgtk2.8)
- obsolete old libwxPythonGTK2.8 instead of conflicting

* Mon Feb 21 2011 ahmad <ahmad> 1:2.8.11.0-4.mga1
+ Revision: 55075
- add BR imagemagick
- we don't need all those BR (Fedora)
- install editro.desktop and editra.png icons
- don't disable installing scripts (let them be copied automatically)
- don't ship 2.5 and 2.6 python eggs, we don't have python 2.5 or 2.6; and these
  eggs mess the python auto-requires
- only build wxPython, we already have wxWidgets from the wxgtku2.8 package
- make the first step of renaming the package to wxPython
- drop the lib package, now the libs come from wxgtku2.8
- add/modify the necessary obsoletes/conflicts/requires tags
- add patch to fix linking

  + dmorgan <dmorgan>
    - Rename desktop files

  + ennael <ennael>
    - remove mdkversion

  + misc <misc>
    - imported package wxPythonGTK