File python-wxGlade.spec of Package python-wxGlade
#
# spec file for package python-wxGlade
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define srcname wxGlade
Name: python-wxGlade
Version: 0.7.2
Release: 0
Summary: A wxWidgets/wxPython/wxPerl GUI designer
License: MIT
Group: Development/Languages/Python
Url: http://wxglade.sourceforge.net
Source0: http://downloads.sourceforge.net/project/wxglade/wxglade/%{version}/%{srcname}-%{version}.tar.gz
Source1: %{srcname}.desktop
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires: wxPython >= 2.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description
wxGlade is a GUI designer written in Python with the popular GUI
toolkit wxPython, that helps you create wxWidgets/wxPython user
interfaces. At the moment it can generate Python, C++, Perl and XRC
(wxWidgets' XML resources) code.
Starting from version 0.7.0, wxGlade requires wxPython >= 2.8 and Python >= 2.4
and <= 2.7.
%prep
%setup -q -n %{srcname}-%{version}
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
install -pm 755 -d %{buildroot}%{_datadir}/pixmaps
install -pm 644 icons/wxglade.xpm -t %{buildroot}%{_datadir}/pixmaps
pushd %{buildroot}%{python_sitelib}/wxglade
chmod +x wxglade.py templates_ui.py msgdialog.py xrc2wxg.py bugdialog_ui.py \
preferences_ui.py
popd
%fdupes -s %{buildroot}
%files
%defattr(-,root,root)
%{_datadir}/doc/wxglade
%{_bindir}/wxglade
%{_datadir}/pixmaps/wxglade.xpm
%{_datadir}/applications/%{srcname}.desktop
%{_datadir}/wxglade
%{_mandir}/man1/wxglade.1.gz
%{python_sitelib}/wxglade/
%{python_sitelib}/%{srcname}-%{version}-py%{python_version}.egg-info
%changelog