File python-simpleparse.spec of Package python-simpleparse

#
# spec file for package python-simpleparse
#
# 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 pyname  simpleparse
%define modname SimpleParse
Summary:        A Parser Generator for Python (w/mxTextTools derivative)
License:        BSD
Group:          Development/Libraries/Python
Name:           python-simpleparse
Version:        2.1.1a2
Release:        0
Source0:        %{modname}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://simpleparse.sourceforge.net
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-setuptools
%if 0%{?suse_version} <= 1110
%{!?python_sitearch:  %global python_sitearch  %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%else
%{py_requires}
%endif

%description
A Parser Generator for Python (w/mxTextTools derivative)

Provides a moderately fast parser generator for use with Python,
includes a forked version of the mxTextTools text-processing library
modified to eliminate recursive operation and fix a number of
undesirable behaviours.

Converts EBNF grammars directly to single-pass parsers for many
largely deterministic grammars.

%prep
%setup -q -n %{modname}-%{version}
mv doc html

%build
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
export CFLAGS="%{optflags} -fno-strict-aliasing"
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes -s %{buildroot}%{python_sitelib}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc license.txt html/*
%{python_sitearch}/%{pyname}/
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by