File python-parsing.spec of Package python-parsing
#
# spec file for package python-parsing
#
# Copyright (c) 2011 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 modname pyparsing
Name: python-parsing
Version: 1.5.2
Release: 2
Summary: Python parsing module
Group: Development/Libraries/Python
License: MIT
Url: http://pyparsing.wikispaces.com/
Source: %{modname}-%{version}.tar.bz2
Patch1: %{name}-setup.py.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%py_requires
%endif
%{py_requires}
BuildRequires: dos2unix python-devel
%if 0%{?suse_version} > 1020
Recommends: python-parsing-doc
%endif
%description
The pyparsing module is an alternative approach to creating and executing
simple grammars, vs. the traditional lex/yacc approach, or the use of regular
expressions. The pyparsing module provides a library of classes that client
code uses to construct the grammar directly in Python code.
Authors:
--------
Paul McGuire <ptmcg@users.sourceforge.net>
%package doc
License: MIT
Group: Development/Libraries/Python
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
%description doc
The pyparsing module is an alternative approach to creating and executing
simple grammars, vs. the traditional lex/yacc approach, or the use of regular
expressions. The pyparsing module provides a library of classes that client
code uses to construct the grammar directly in Python code.
Authors:
--------
Paul McGuire <ptmcg@users.sourceforge.net>
%prep
%setup -q -n %{modname}-%{version}
%patch1
# Fix rpmlint warnings:
find . -type f -print0 | xargs -0 dos2unix
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
python setup.py build
%install
python setup.py install \
--prefix=%{_prefix} \
--root=$RPM_BUILD_ROOT \
--record=%{name}.files
%clean
rm -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root)
%doc CHANGES LICENSE README
%files doc
%defattr(-,root,root)
%doc htmldoc docs examples HowToUsePyparsing.html
%doc pyparsingClassDiagram.JPG pyparsingClassDiagram.PNG robots.txt
%changelog