%global oname Parsley %global lowname parsley Name: python-parsley Version: 1.2 Release: 3%{?dist} Summary: Parsing and pattern matching made easy License: MIT URL: https://launchpad.net/parsley Source0: https://pypi.python.org/packages/source/P/%{oname}/%{oname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-twisted BuildRequires: python-sphinx %description A parser generator library based on OMeta, and other useful parsing tools. Parsley is a parsing library for people who find parsers scary or annoying. I wrote it because I wanted to parse a programming language, and tools like PLY or ANTLR or Bison were very hard to understand and integrate into my Python code. Most parser generators are based on LL or LR parsing algorithms that compile to big state machine tables. It was like I had to wake up a different section of my brain to understand or work on grammar rules. Parsley, like pyparsing and ZestyParser, uses the PEG algorithm, so each expression in the grammar rules works like a Python expression. In particular, alternatives are evaluated in order, unlike table-driven parsers such as yacc, bison or PLY. Parsley is an implementation of OMeta, an object-oriented pattern-matching language developed by Alessandro Warth at thesis, which provides a detailed description of OMeta: http://www.vpri.org/pdf/tr2008003_experimenting.pdf %prep %setup -q -n %{oname}-%{version} rm -rf *.egg* %build %{__python2} setup.py build make -C doc html man rm -f doc/_build/html/.buildinfo %install %{__python2} setup.py install --skip-build --root %{buildroot} mkdir -p %{buildroot}%{_mandir}/man1 cp -a %{_builddir}/%{oname}-%{version}/doc/_build/man/%{lowname}.1* %{buildroot}%{_mandir}/man1 # Checks are not running due to problems with the default route in modules. # Investigating with upstream # %check # pushd terml/test # PYTHONPATH=$(pwd) # %{__python2} -m unittest -v test_terml # %{__python2} -m unittest -v test_quasiterm # popd # pushd ometa/test # PYTHONPATH=$(pwd) # %{__python2} -m unittest -v test_builder # %{__python2} -m unittest -v test_protocol # %{__python2} -m unittest -v test_pymeta # %{__python2} -m unittest -v test_runtime # popd %files %doc LICENSE NEWS README %{_mandir}/man1/%{lowname}.1* %{python2_sitelib}/%{oname}-%{version}-py2.7.egg-info %{python2_sitelib}/ometa/ %{python2_sitelib}/%{lowname}.* %{python2_sitelib}/terml/ %changelog * Fri Jan 09 2015 Robert Mayr 1.2-3 - Applying permission fix and correct check section BZ #1179947 * Thu Jan 08 2015 Robert Mayr 1.2-2 - Applying bugfixes accordingly to comments in BZ #1179947 * Wed Jan 07 2015 Robert Mayr 1.2-1 - Initial package for Fedora