2023-10-18 07:58:17 +00:00
|
|
|
%global __python3 /usr/bin/python3.12
|
|
|
|
%global python3_pkgversion 3.12
|
|
|
|
|
2023-10-18 07:17:06 +00:00
|
|
|
%global modname ply
|
|
|
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
2023-10-18 07:58:17 +00:00
|
|
|
Name: python%{python3_pkgversion}-%{modname}
|
2023-10-18 07:17:06 +00:00
|
|
|
Summary: Python Lex-Yacc
|
|
|
|
Version: 3.11
|
2024-01-23 17:00:07 +00:00
|
|
|
Release: 2%{?dist}
|
2023-10-18 07:58:17 +00:00
|
|
|
License: BSD
|
2023-10-18 07:17:06 +00:00
|
|
|
URL: http://www.dabeaz.com/ply/
|
|
|
|
Source0: http://www.dabeaz.com/ply/%{modname}-%{version}.tar.gz
|
|
|
|
# Fix build against Python 3.11
|
|
|
|
# https://github.com/dabeaz/ply/pull/262
|
|
|
|
Patch0: 262.patch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2023-10-18 07:58:17 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
2023-10-18 07:17:06 +00:00
|
|
|
%description
|
|
|
|
PLY is a straightforward lex/yacc implementation. Here is a list of its
|
|
|
|
essential features:
|
|
|
|
* It is implemented entirely in Python.
|
|
|
|
* It uses LR-parsing which is reasonably efficient and well suited for larger
|
|
|
|
grammars.
|
|
|
|
* PLY provides most of the standard lex/yacc features including support
|
|
|
|
for empty productions, precedence rules, error recovery, and support
|
|
|
|
for ambiguous grammars.
|
|
|
|
* PLY is straightforward to use and provides very extensive error checking.
|
|
|
|
* PLY doesn't try to do anything more or less than provide the basic lex/yacc
|
|
|
|
functionality. In other words, it's not a large parsing framework or a
|
|
|
|
component of some larger system.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n %{modname}-%{version}
|
|
|
|
%patch0 -p1 -b .262
|
|
|
|
find example/ -type f -executable -exec chmod -x {} ';'
|
|
|
|
find example/ -type f -name '*.py' -exec sed -i \
|
|
|
|
-e '1{\@^#!/usr/bin/env python@d}' -e '1{\@^#!/usr/local/bin/python@d}' \
|
|
|
|
{} ';'
|
|
|
|
rm -rf *.egg-info
|
|
|
|
# extract license block from beginning of README.md
|
|
|
|
grep -B1000 "POSSIBILITY OF SUCH DAMAGE" README.md > LICENSE
|
|
|
|
|
|
|
|
%build
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
pushd test
|
|
|
|
./cleanup.sh
|
|
|
|
%{__python3} testlex.py
|
|
|
|
%{__python3} testyacc.py
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|
2023-10-18 07:58:17 +00:00
|
|
|
%files -n python%{python3_pkgversion}-%{modname}
|
2023-10-18 07:17:06 +00:00
|
|
|
%doc CHANGES README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{python3_sitelib}/%{modname}/
|
|
|
|
%{python3_sitelib}/%{modname}-%{version}-*.egg-info/
|
|
|
|
|
|
|
|
%changelog
|
2024-01-23 17:00:07 +00:00
|
|
|
* Tue Jan 23 2024 Miro Hrončok <mhroncok@redhat.com> - 3.11-2
|
|
|
|
- Rebuilt for timestamp .pyc invalidation mode
|
|
|
|
|
2023-10-18 07:58:17 +00:00
|
|
|
* Wed Oct 18 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.11-22
|
|
|
|
- Initial package
|
|
|
|
- Fedora contributions by:
|
|
|
|
Bill Nottingham <notting@fedoraproject.org>
|
|
|
|
Charalampos Stratakis <cstratak@redhat.com>
|
|
|
|
Christian Heimes <cheimes@redhat.com>
|
|
|
|
Dennis Gilmore <dennis@ausil.us>
|
|
|
|
dmalcolm <dmalcolm@fedoraproject.org>
|
|
|
|
Ignacio Vazquez-Abrams <ivazquez@fedoraproject.org>
|
|
|
|
Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
Jesse Keating <jkeating@fedoraproject.org>
|
|
|
|
Miro Hrončok <miro@hroncok.cz>
|
|
|
|
Orion Poplawski <orion@cora.nwra.com>
|
|
|
|
Patrik Kopkan <pkopkan@redhat.com>
|
|
|
|
Rob Crittenden <rcritten@redhat.com>
|
|
|
|
Robert Kuska <rkuska@redhat.com>
|
|
|
|
Slavek Kabrda <bkabrda@redhat.com>
|
|
|
|
Stephen Gallagher <sgallagh@redhat.com>
|
|
|
|
Thomas Spura <tomspur@fedoraproject.org>
|
|
|
|
Tom spot Callaway <spot@fedoraproject.org>
|
|
|
|
Troy Dawson <tdawson@redhat.com>
|
2023-10-18 07:17:06 +00:00
|
|
|
|