3bcb5e7
%global		oname Parsley
3bcb5e7
%global		lowname parsley
ishcherb 9a7fda8
3bcb5e7
Name:		python-parsley
e46a8d9
Version:	1.3
955eeb8
Release:	8%{?dist}
3bcb5e7
Summary:	Parsing and pattern matching made easy
3bcb5e7
License:	MIT
3bcb5e7
URL:		https://launchpad.net/parsley
ishcherb 9a7fda8
Source0:	https://files.pythonhosted.org/packages/source/P/%{oname}/%{oname}-%{version}.tar.gz
3bcb5e7
BuildArch:	noarch
ishcherb 9a7fda8
3bcb5e7
BuildRequires:	python2-devel
ishcherb 9a7fda8
BuildRequires:	python2-pytest
ishcherb 9a7fda8
BuildRequires:	python2-twisted
ishcherb 9a7fda8
BuildRequires:	python2-sphinx
ishcherb 9a7fda8
ishcherb 9a7fda8
BuildRequires:	python3-devel
ishcherb 9a7fda8
BuildRequires:	python3-pytest
ishcherb 9a7fda8
BuildRequires:	python3-twisted
ishcherb 9a7fda8
BuildRequires:	python3-sphinx
3bcb5e7
75cd44f
%global _description\
75cd44f
A parser generator library based on OMeta, and other useful parsing tools.\
75cd44f
Parsley is a parsing library for people who find parsers scary or\
75cd44f
annoying. I wrote it because I wanted to parse a programming language,\
75cd44f
and tools like PLY or ANTLR or Bison were very hard to understand and\
75cd44f
integrate into my Python code. Most parser generators are based on LL\
75cd44f
or LR parsing algorithms that compile to big state machine\
75cd44f
tables. It was like I had to wake up a different section of my brain\
75cd44f
to understand or work on grammar rules.\
75cd44f
\
75cd44f
Parsley, like pyparsing and ZestyParser, uses the PEG algorithm, so\
75cd44f
each expression in the grammar rules works like a Python\
75cd44f
expression. In particular, alternatives are evaluated in order, unlike\
75cd44f
table-driven parsers such as yacc, bison or PLY.\
75cd44f
\
75cd44f
Parsley is an implementation of OMeta, an object-oriented\
75cd44f
pattern-matching language developed by Alessandro Warth at\
75cd44f
thesis, which provides a detailed description of OMeta:\
75cd44f
http://www.vpri.org/pdf/tr2008003_experimenting.pdf
3bcb5e7
75cd44f
%description %_description
3bcb5e7
75cd44f
%package -n python2-parsley
75cd44f
Summary: %summary
75cd44f
%{?python_provide:%python_provide python2-parsley}
75cd44f
75cd44f
%description -n python2-parsley %_description
3bcb5e7
ishcherb 9a7fda8
%package -n python3-parsley
ishcherb 9a7fda8
Summary: %summary
ishcherb 9a7fda8
%{?python_provide:%python_provide python3-parsley}
ishcherb 9a7fda8
ishcherb 9a7fda8
%description -n python3-parsley %_description
ishcherb 9a7fda8
3bcb5e7
%prep
3bcb5e7
%setup -q -n %{oname}-%{version}
3bcb5e7
rm -rf *.egg*
3bcb5e7
3bcb5e7
%build
ishcherb 9a7fda8
%py2_build
ishcherb 9a7fda8
%py3_build
3bcb5e7
make -C doc html man
3bcb5e7
rm -f doc/_build/html/.buildinfo
3bcb5e7
3bcb5e7
%install
ishcherb 9a7fda8
%py2_install
ishcherb 9a7fda8
%py3_install
3bcb5e7
mkdir -p %{buildroot}%{_mandir}/man1
3bcb5e7
cp -a %{_builddir}/%{oname}-%{version}/doc/_build/man/%{lowname}.1* %{buildroot}%{_mandir}/man1
3bcb5e7
ishcherb 9a7fda8
ishcherb 9a7fda8
%check
ishcherb 9a7fda8
# Exclude only test_vm_builder tests, as they are failing due to missing vm files.
ishcherb 9a7fda8
py.test-%{python2_version} terml/test ometa/test --ignore=ometa/test/test_vm_builder.py
ishcherb 9a7fda8
py.test-%{python3_version} terml/test ometa/test --ignore=ometa/test/test_vm_builder.py
ishcherb 9a7fda8
3bcb5e7
75cd44f
%files -n python2-parsley
ishcherb 9a7fda8
%license LICENSE
ishcherb 9a7fda8
%doc NEWS README
3bcb5e7
%{_mandir}/man1/%{lowname}.1*
ishcherb 9a7fda8
%{python2_sitelib}/%{oname}-%{version}-py2.*.egg-info
3bcb5e7
%{python2_sitelib}/ometa/
3bcb5e7
%{python2_sitelib}/%{lowname}.*
3bcb5e7
%{python2_sitelib}/terml/
3bcb5e7
ishcherb 9a7fda8
%files -n python3-parsley
ishcherb 9a7fda8
%license LICENSE
ishcherb 9a7fda8
%doc NEWS README
ishcherb 9a7fda8
%{_mandir}/man1/%{lowname}.1*
ishcherb 9a7fda8
%{python3_sitelib}/%{oname}-%{version}-py3.*.egg-info
ishcherb 9a7fda8
%{python3_sitelib}/ometa/
ishcherb 9a7fda8
%{python3_sitelib}/__pycache__/%{lowname}.*
ishcherb 9a7fda8
%{python3_sitelib}/%{lowname}.*
ishcherb 9a7fda8
%{python3_sitelib}/terml/
ishcherb 9a7fda8
ishcherb 9a7fda8
3bcb5e7
%changelog
955eeb8
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-8
955eeb8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
955eeb8
ishcherb 9a7fda8
* Tue Aug 22 2017 Iryna Shcherbina <ishcherb@redhat.com> - 1.3-7
ishcherb 9a7fda8
- Provide a Python 3 subpackage (rhbz#1472491)
ishcherb 9a7fda8
- Run tests
ishcherb 9a7fda8
75cd44f
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3-6
75cd44f
- Python 2 binary package renamed to python2-parsley
75cd44f
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
75cd44f
a890b4d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-5
a890b4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a890b4d
d07b461
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-4
d07b461
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d07b461
8809c20
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-3
8809c20
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8809c20
995e019
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
995e019
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
995e019
e46a8d9
* Thu Dec 31 2015 Robert Mayr <robyduck@fedoraoproject.org> 1.3-1
e46a8d9
- Bump release to 1.3
e46a8d9
f2dc460
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-4
f2dc460
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f2dc460
3bcb5e7
* Fri Jan 09 2015 Robert Mayr <robyduck@fedoraoproject.org> 1.2-3
3bcb5e7
- Applying permission fix and correct check section BZ #1179947
3bcb5e7
3bcb5e7
* Thu Jan 08 2015 Robert Mayr <robyduck@fedoraoproject.org> 1.2-2
3bcb5e7
- Applying bugfixes accordingly to comments in BZ #1179947
3bcb5e7
3bcb5e7
* Wed Jan 07 2015 Robert Mayr <robyduck@fedoraoproject.org> 1.2-1
3bcb5e7
- Initial package for Fedora