File python-pywurfl.spec of Package python-pywurfl
# norootforbuild
%if 0%{!?python_sitelib:1} || 0%{!?python_sitearch:1}
%define python_sitelib %py_sitedir
%define python_sitearch %py_sitedir
%endif
%define mod_name pywurfl
Summary: Python tools for the Wireless Universal Resource File (WURFL)
Name: python-%{mod_name}
Version: 7.1.1
Release: 0
License: LGPLv2.1+
Group: Development/Libraries/Python
URL: http://celljam.net
Source0: %{mod_name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %suse_version >= 1120
BuildArch: noarch
%endif
%py_requires
BuildRequires: python-devel python-setuptools
BuildRequires: python-Levenshtein
%if 0%{?suse_version} >= 1110
Requires: python-base >= %{py_ver}
%else
Requires: python >= %{py_ver}
%endif
Requires: python-pyparsing >= 1.5
Requires: python-Levenshtein
Recommends: %{name}-doc
%description
Pywurfl is a Python language package that makes dealing with the WURFL in Python
a little easier. It contains tools that allow you to retrieve objects that
represent devices defined in the WURFL or manipulate the WURFL device hierarchy
by using a simple set of API functions or a pywurfl specific query language.
Also included within the package is a WURFL processor class that provides an
event based API that can be used to alleviate some of the work when processing
the WURFL sequentially.
Authors:
--------
Armand Lynch (lyncha at users dot sourceforge dot net)
%package doc
Summary: Documentation for %{name}
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
%description doc
Documentation and examples for %{name}
%prep
%setup -q -n "%{mod_name}-%{version}"
%build
%__python ./setup.py build
%install
%__python ./setup.py install \
--prefix="%{_prefix}" \
--root="%{buildroot}" \
--record-rpm=files.lst
%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"
%files -f files.lst
%defattr(-,root,root)
%doc LICENSE PKG-INFO
%files doc
%defattr(-,root,root,-)
%doc doc/*
%changelog