2008-03-28 03:58:27 +00:00
|
|
|
#
|
2011-03-31 09:47:45 +00:00
|
|
|
# spec file for package python-ply
|
2008-03-28 03:58:27 +00:00
|
|
|
#
|
2023-04-21 14:13:36 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2008-03-28 03:58:27 +00:00
|
|
|
#
|
2008-09-13 10:05:48 +00:00
|
|
|
# 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.
|
2011-12-06 09:37:26 +00:00
|
|
|
|
2023-04-21 14:13:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-03-28 03:58:27 +00:00
|
|
|
#
|
|
|
|
|
2012-06-11 07:44:47 +00:00
|
|
|
|
2023-04-21 14:13:36 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2017-03-17 06:30:24 +00:00
|
|
|
Name: python-ply
|
2018-05-31 16:01:59 +00:00
|
|
|
Version: 3.11
|
2012-02-14 08:33:53 +00:00
|
|
|
Release: 0
|
2011-03-31 09:47:45 +00:00
|
|
|
Summary: Python Lex & Yacc
|
2012-02-14 08:33:53 +00:00
|
|
|
License: BSD-3-Clause
|
2008-03-28 03:58:27 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-08-29 09:13:55 +00:00
|
|
|
URL: http://www.dabeaz.com/ply/
|
2017-07-10 20:06:15 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/ply/ply-%{version}.tar.gz
|
2008-03-28 03:58:27 +00:00
|
|
|
Patch0: python-ply-shebangs.patch
|
2018-05-31 16:01:59 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-07-10 20:06:15 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-17 06:30:24 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2011-12-06 09:37:26 +00:00
|
|
|
BuildArch: noarch
|
2017-03-17 06:30:24 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
2008-03-28 03:58:27 +00:00
|
|
|
%description
|
2011-03-31 09:47:45 +00:00
|
|
|
PLY is yet another implementation of lex and yacc for Python. Some notable
|
|
|
|
features include the fact that its implemented entirely in Python and it
|
|
|
|
uses LALR(1) parsing which is efficient and well suited for larger grammars.
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2018-08-29 09:13:55 +00:00
|
|
|
PLY provides most of the standard lex/yacc features including support for empty
|
|
|
|
productions, precedence rules, error recovery, and support for ambiguous grammars.
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2018-09-11 07:17:41 +00:00
|
|
|
PLY provides extensive error checking.
|
2011-03-31 09:47:45 +00:00
|
|
|
It is compatible with both Python 2 and Python 3.
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2023-04-26 21:05:10 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-07-10 20:06:15 +00:00
|
|
|
%package -n %{name}-doc
|
2011-03-31 09:47:45 +00:00
|
|
|
Summary: Python Lex & Yacc
|
2018-08-29 09:13:55 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2012-02-14 08:33:53 +00:00
|
|
|
Group: Development/Languages/Python
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2017-07-10 20:06:15 +00:00
|
|
|
%description -n %{name}-doc
|
2011-03-31 09:47:45 +00:00
|
|
|
PLY is yet another implementation of lex and yacc for Python. Some notable
|
|
|
|
features include the fact that its implemented entirely in Python and it
|
|
|
|
uses LALR(1) parsing which is efficient and well suited for larger grammars.
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2018-08-29 09:13:55 +00:00
|
|
|
PLY provides most of the standard lex/yacc features including support for empty
|
|
|
|
productions, precedence rules, error recovery, and support for ambiguous grammars.
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2018-09-11 07:17:41 +00:00
|
|
|
PLY provides extensive error checking.
|
2011-03-31 09:47:45 +00:00
|
|
|
It is compatible with both Python 2 and Python 3.
|
2023-04-26 21:05:10 +00:00
|
|
|
%endif
|
2008-03-28 03:58:27 +00:00
|
|
|
|
|
|
|
%prep
|
2017-03-17 06:30:24 +00:00
|
|
|
%setup -q -n ply-%{version}
|
2008-03-28 03:58:27 +00:00
|
|
|
%patch0 -p1
|
2015-05-16 12:51:27 +00:00
|
|
|
# remove unneeded executable bit
|
|
|
|
chmod -x test/testlex.py
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2017-07-10 20:06:15 +00:00
|
|
|
# Fix wrong-script-interpreter
|
2018-09-11 07:17:41 +00:00
|
|
|
find example -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} +
|
2017-07-10 20:06:15 +00:00
|
|
|
|
|
|
|
%fdupes doc
|
|
|
|
%fdupes example
|
|
|
|
|
2010-09-14 12:11:25 +00:00
|
|
|
%build
|
2017-03-17 06:30:24 +00:00
|
|
|
%python_build
|
2010-09-14 12:11:25 +00:00
|
|
|
|
2008-03-28 03:58:27 +00:00
|
|
|
%install
|
2017-03-17 06:30:24 +00:00
|
|
|
%python_install
|
2017-07-10 20:06:15 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2015-10-07 08:00:31 +00:00
|
|
|
%check
|
|
|
|
pushd test
|
2018-05-31 16:01:59 +00:00
|
|
|
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}
|
2018-08-29 09:13:55 +00:00
|
|
|
$python -B testlex.py
|
2018-05-31 16:01:59 +00:00
|
|
|
$python -B testyacc.py
|
|
|
|
}
|
|
|
|
popd
|
2015-10-07 08:00:31 +00:00
|
|
|
|
2017-03-17 06:30:24 +00:00
|
|
|
%files %{python_files}
|
2018-08-29 09:13:55 +00:00
|
|
|
# yay for upstream that puts the license to readme
|
|
|
|
%license README.md
|
2018-05-31 16:01:59 +00:00
|
|
|
%doc ANNOUNCE CHANGES README.md TODO
|
2017-07-10 20:06:15 +00:00
|
|
|
%{python_sitelib}/*
|
2008-03-28 03:58:27 +00:00
|
|
|
|
2023-04-26 21:05:10 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-07-10 20:06:15 +00:00
|
|
|
%files -n %{name}-doc
|
2023-04-26 21:05:10 +00:00
|
|
|
%endif
|
2017-07-10 20:06:15 +00:00
|
|
|
%doc doc/
|
|
|
|
%doc example/
|
2008-03-28 03:58:27 +00:00
|
|
|
|
|
|
|
%changelog
|