7a5c9d
%global modname ply
7a5c9d
7a5c9d
%bcond_without tests
7a5c9d
7a5c9d
Name:           python-%{modname}
7a5c9d
Summary:        Python Lex-Yacc
7a5c9d
Version:        3.11
7a5c9d
Release:        14%{?dist}
7a5c9d
License:        BSD
7a5c9d
URL:            http://www.dabeaz.com/ply/
7a5c9d
Source0:        http://www.dabeaz.com/ply/%{modname}-%{version}.tar.gz
7a5c9d
BuildArch:      noarch
7a5c9d
7a5c9d
%description
7a5c9d
PLY is a straightforward lex/yacc implementation. Here is a list of its 
7a5c9d
essential features:
7a5c9d
* It is implemented entirely in Python.
7a5c9d
* It uses LR-parsing which is reasonably efficient and well suited for larger 
7a5c9d
  grammars.
7a5c9d
* PLY provides most of the standard lex/yacc features including support 
7a5c9d
  for empty productions, precedence rules, error recovery, and support 
7a5c9d
  for ambiguous grammars.
7a5c9d
* PLY is straightforward to use and provides very extensive error checking.
7a5c9d
* PLY doesn't try to do anything more or less than provide the basic lex/yacc 
7a5c9d
  functionality. In other words, it's not a large parsing framework or a 
7a5c9d
  component of some larger system. 
7a5c9d
7a5c9d
%package -n python3-%{modname}
7a5c9d
Summary:        Python Lex-Yacc
7a5c9d
%{?python_provide:%python_provide python3-%{modname}}
7a5c9d
BuildRequires:  python3-devel
7a5c9d
BuildRequires:  python3-setuptools
7a5c9d
7a5c9d
%description -n python3-%{modname}
7a5c9d
PLY is a straightforward lex/yacc implementation. Here is a list of its 
7a5c9d
essential features:
7a5c9d
* It is implemented entirely in Python.
7a5c9d
* It uses LR-parsing which is reasonably efficient and well suited for larger 
7a5c9d
  grammars.
7a5c9d
* PLY provides most of the standard lex/yacc features including support 
7a5c9d
  for empty productions, precedence rules, error recovery, and support 
7a5c9d
  for ambiguous grammars.
7a5c9d
* PLY is straightforward to use and provides very extensive error checking.
7a5c9d
* PLY doesn't try to do anything more or less than provide the basic lex/yacc 
7a5c9d
  functionality. In other words, it's not a large parsing framework or a 
7a5c9d
  component of some larger system.
7a5c9d
7a5c9d
Python 3 version.
7a5c9d
7a5c9d
%prep
7a5c9d
%autosetup -n %{modname}-%{version}
7a5c9d
find example/ -type f -executable -exec chmod -x {} ';'
7a5c9d
find example/ -type f -name '*.py' -exec sed -i \
7a5c9d
  -e '1{\@^#!/usr/bin/env python@d}' -e '1{\@^#!/usr/local/bin/python@d}' \
7a5c9d
  {} ';'
7a5c9d
rm -rf *.egg-info
7a5c9d
# extract license block from beginning of README.md
7a5c9d
grep -B1000 "POSSIBILITY OF SUCH DAMAGE" README.md > LICENSE
7a5c9d
7a5c9d
%build
7a5c9d
%py3_build
7a5c9d
7a5c9d
%install
7a5c9d
%py3_install
7a5c9d
7a5c9d
%if %{with tests}
7a5c9d
%check
7a5c9d
pushd test
7a5c9d
  ./cleanup.sh
7a5c9d
  %{__python3} testlex.py
7a5c9d
  %{__python3} testyacc.py
7a5c9d
popd
7a5c9d
%endif
7a5c9d
7a5c9d
%files -n python3-%{modname}
7a5c9d
%doc CHANGES README.md
7a5c9d
%license LICENSE
7a5c9d
%{python3_sitelib}/%{modname}/
7a5c9d
%{python3_sitelib}/%{modname}-%{version}-*.egg-info/
7a5c9d
7a5c9d
%changelog
7a5c9d
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.11-14
7a5c9d
- Add automatically generated Obsoletes tag with the python39- prefix
7a5c9d
  for smoother upgrade from RHEL8
7a5c9d
- Related: rhbz#1990421
7a5c9d
7a5c9d
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.11-13
7a5c9d
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
7a5c9d
  Related: rhbz#1991688
7a5c9d
7a5c9d
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.11-12
7a5c9d
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
7a5c9d
7a5c9d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-11
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
7a5c9d
7a5c9d
* Tue Jan  5 15:25:57 CET 2021 Christian Heimes <cheimes@redhat.com> - 3.11-10
7a5c9d
- Extract and ship license file (#1912893)
7a5c9d
7a5c9d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-9
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7a5c9d
7a5c9d
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.11-8
7a5c9d
- Rebuilt for Python 3.9
7a5c9d
7a5c9d
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-7
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7a5c9d
7a5c9d
* Sun Oct 20 2019 Miro Hrončok <mhroncok@redhat.com> - 3.11-6
7a5c9d
- Subpackage python2-ply has been removed
7a5c9d
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
7a5c9d
7a5c9d
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.11-5
7a5c9d
- Rebuilt for Python 3.8.0rc1 (#1748018)
7a5c9d
7a5c9d
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.11-4
7a5c9d
- Rebuilt for Python 3.8
7a5c9d
7a5c9d
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-3
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7a5c9d
7a5c9d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-2
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7a5c9d
7a5c9d
* Fri Jan 11 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.11-1
7a5c9d
- Update to 3.11
7a5c9d
7a5c9d
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-8
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7a5c9d
7a5c9d
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.9-7
7a5c9d
- Rebuilt for Python 3.7
7a5c9d
7a5c9d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-6
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7a5c9d
7a5c9d
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 3.9-5
7a5c9d
- Cleanup spec file conditionals
7a5c9d
7a5c9d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-4
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7a5c9d
7a5c9d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9-3
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7a5c9d
7a5c9d
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.9-2
7a5c9d
- Rebuild for Python 3.6
7a5c9d
7a5c9d
* Tue Nov 8 2016 Orion Poplawski <orion@cora.nwra.com> - 3.9-1
7a5c9d
- Update to 3.9
7a5c9d
7a5c9d
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
7a5c9d
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7a5c9d
7a5c9d
* Sun Apr 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 3.8-1
7a5c9d
- Update to 3.8
7a5c9d
- Follow new packaging guidelines
7a5c9d
- Run tests
7a5c9d
7a5c9d
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-4
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7a5c9d
7a5c9d
* Tue Oct 13 2015 Robert Kuska <rkuska@redhat.com> - 3.6-3
7a5c9d
- Rebuilt for Python3.5 rebuild
7a5c9d
7a5c9d
* Tue Aug 18 2015 Stephen Gallagher <sgallagh@redhat.com> 3.6-2
7a5c9d
- Fixes for chromium and SlimIt
7a5c9d
- Resolves: rhbz#1242929
7a5c9d
- Resolves: rhbz#1254372
7a5c9d
7a5c9d
* Tue Jul 14 2015 Stephen Gallagher <sgallagh@redhat.com> 3.6-1
7a5c9d
- Update to latest ply 3.6 for Python 3 fixes
7a5c9d
7a5c9d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-8
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7a5c9d
7a5c9d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-7
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7a5c9d
7a5c9d
* Mon May 12 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4-6
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
7a5c9d
7a5c9d
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-5
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7a5c9d
7a5c9d
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-4
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7a5c9d
7a5c9d
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.4-3
7a5c9d
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
7a5c9d
7a5c9d
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4-2
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7a5c9d
7a5c9d
* Mon Mar 19 2012 Tom Callaway <spot@fedoraproject.org> - 3.4-1
7a5c9d
- update to 3.4
7a5c9d
7a5c9d
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-6
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7a5c9d
7a5c9d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-5
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7a5c9d
7a5c9d
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.3-4
7a5c9d
- update to most recent python packaging guidelines
7a5c9d
- rebuild with python3.2
7a5c9d
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
7a5c9d
7a5c9d
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.3-3
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
7a5c9d
7a5c9d
* Sat Apr  3 2010 David Malcolm <dmalcolm@redhat.com> - 3.3-2
7a5c9d
- add python3-ply subpackage
7a5c9d
7a5c9d
* Mon Oct 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.3-1
7a5c9d
- update to 3.3
7a5c9d
7a5c9d
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-2
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7a5c9d
7a5c9d
* Wed Apr 22 2009 Tom "spot" Callaway <tcallawa@redhat.com> 3.2-1
7a5c9d
- update to 3.2, license change to BSD
7a5c9d
7a5c9d
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-3
7a5c9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7a5c9d
7a5c9d
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.5-2
7a5c9d
- Rebuild for Python 2.6
7a5c9d
7a5c9d
* Fri Oct 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.5-1
7a5c9d
- update to 2.5
7a5c9d
7a5c9d
* Mon Mar 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.2.3-2
7a5c9d
- add example dir as doc
7a5c9d
7a5c9d
* Sat Mar 15 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.2.3-1
7a5c9d
- Initial package for Fedora