File python-mwlib.xhtml.spec of Package python-mwlib.xhtml

#
# spec file for package python-mwlib.xhtml
#
# Copyright (c) 2013 SUSE LINUX Products 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 mod_name mwlib.xhtml

Name:           python-mwlib.xhtml
Version:        0.1.0
Release:        1
Summary:        XHTML writer for mwlib
Group:          Development/Languages/Python
License:        BSD-2-Clause
Url:            http://pypi.python.org/pypi/mwlib.xhtml
Source0:        http://pypi.python.org/packages/source/m/%{mod_name}/%{mod_name}-%{version}.zip

BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  unzip fdupes
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")}
%else
BuildArch:      noarch
%endif
Requires:	python-pyfribidi
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
xhtml writer for mwlib. More on: https://pypi.python.org/pypi/mwlib.xhtml

%prep
%setup -n %{mod_name}-%{version}


%build
python setup.py build


%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# fix for rpmlint
pushd %{buildroot}%{python_sitelib}/mwlib
list="xhtmlwriter.py xmlcat/build-cat.py xmltreecleaner.py"
for i in $list
do
    chmod +x "$i"
done
popd
%fdupes -s %{buildroot}%{python_sitelib}
 
%files
%defattr(-,root,root)
%{python_sitelib}

%changelog
openSUSE Build Service is sponsored by