From 396b335176eab7d59ea4460105d4a2a32abeab056c70e7af22026971a551ac89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 21:54:15 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-ply revision b2d8b820047f2bcf60a04402cb9f17f6 --- .gitattributes | 23 +++++ ply-3.11.tar.gz | 3 + python-ply-shebangs.patch | 10 ++ python-ply.changes | 206 ++++++++++++++++++++++++++++++++++++++ python-ply.spec | 103 +++++++++++++++++++ 5 files changed, 345 insertions(+) create mode 100644 .gitattributes create mode 100644 ply-3.11.tar.gz create mode 100644 python-ply-shebangs.patch create mode 100644 python-ply.changes create mode 100644 python-ply.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/ply-3.11.tar.gz b/ply-3.11.tar.gz new file mode 100644 index 0000000..bb173ed --- /dev/null +++ b/ply-3.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3 +size 159130 diff --git a/python-ply-shebangs.patch b/python-ply-shebangs.patch new file mode 100644 index 0000000..0581956 --- /dev/null +++ b/python-ply-shebangs.patch @@ -0,0 +1,10 @@ +Index: ply-3.3/example/yply/yply.py +=================================================================== +--- ply-3.3.orig/example/yply/yply.py 2006-11-21 16:09:46.000000000 +0100 ++++ ply-3.3/example/yply/yply.py 2010-09-14 10:43:14.157808186 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/python ++#!/usr/bin/env python + # yply.py + # + # Author: David Beazley (dave@dabeaz.com) diff --git a/python-ply.changes b/python-ply.changes new file mode 100644 index 0000000..ef966e4 --- /dev/null +++ b/python-ply.changes @@ -0,0 +1,206 @@ +------------------------------------------------------------------- +Sun Apr 23 23:14:24 UTC 2023 - Matej Cepl + +- Move documentation into main package for SLE15 + +------------------------------------------------------------------- +Fri Apr 21 12:29:32 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:43:05 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Mon Sep 10 17:03:54 UTC 2018 - Jan Engelhardt + +- Trim bias from description. Use 'find +'. + +------------------------------------------------------------------- +Wed Aug 29 09:13:41 UTC 2018 - tchvatal@suse.com + +- Install some license +- Remove devel dependency + +------------------------------------------------------------------- +Thu May 31 15:39:30 UTC 2018 - toddrme2178@gmail.com + +- Update to 3.11 + * Fixed some minor bugs related to re flags and token order. + * Added a set_lexpos() method to grammar symbols. Github issue #148. + * Mostly minor bug fixes and small code cleanups. + +------------------------------------------------------------------- +Mon Jul 10 18:42:12 UTC 2017 - toddrme2178@gmail.com + +- Fix wrong-script-interpreter rpmlint error. + +------------------------------------------------------------------- +Thu Mar 16 19:28:47 UTC 2017 - rjschwei@suse.com + +- Switch to single-spec build +- Update to 3.10 + * Changed grammar signature computation to not involve hashing + functions. Parts are just combined into a big string. + +------------------------------------------------------------------- +Fri Sep 2 13:55:35 UTC 2016 - tbechtold@suse.com + +- update to 3.9: + * Exposed the parser state number as the parser.state attribute + in productions and error functions. + * Fixed Issue #88. Python3 compatibility with ply/cpp. + * Fixed Issue #93. Ply can crash if SyntaxError is raised inside + a production. Not actually sure if the original implementation + worked as documented at all. Yacc has been modified to follow + the spec as outlined in the CHANGES noted for 11/27/07 below. + * Fixed Issue #97. Failure with code validation when the original + source files aren't present. Validation step now ignores + the missing file. + * Minor fixes to version numbers. + +------------------------------------------------------------------- +Wed Oct 7 06:24:38 UTC 2015 - hpj@urpla.net + +- update to version 3.8: + * Fixed issues related to Python 3.5. Patch contributed by Barry Warsaw. + +- update to version 3.7 + * Fixed problems when reading table files from pickled data. + * Fixed regression in handling of table modules if specified as module + objects. See https://github.com/dabeaz/ply/issues/63 + +- clean up spec +- add testing rig + +------------------------------------------------------------------- +Mon May 11 12:39:33 UTC 2015 - benoit.monin@gmx.fr + +- update to version 3.6: + * If PLY is unable to create the 'parser.out' or 'parsetab.py' + files due to permission issues, it now just issues a warning + message and continues to operate + * Fixed some issues related to use of packages and table file + modules +- additional changes from version 3.5: + * Added support for defaulted_states in the parser + * Fixed debug logging in the parser + * Added actions to be defined to character literals (Issue #32) + * Import of the 'parsetab.py' file is now constrained to only + consider the directory specified by the outputdir argument to + yacc() + * Changed default output directory to be the same as that in + which the yacc grammar is defined + * Changed the parsetab.py file signature slightly so that the + parsetab won't regenerate if created on a different major + version of Python + * Fixed Issue #44 call_errorfunc() should return the result of + errorfunc() + * Support for versions of Python <2.7 is officially dropped + * Fixed bug related to calling yacc(start=...) + * Added skipped tests for PyPy and Java + * Added filter to make unit tests pass under 'python -3' + * Fixed CPP_INTEGER regex in ply/cpp.py (Issue 21) + * Fixed yacc validation bugs when from __future__ import + unicode_literals is being used + * Added support for Travis-CI + * Added a .gitignore file + * Fixed validation problems for source files that include a + different source code encoding specifier + * Fixed unit tests for yacc to eliminate random failures due to + dict hash value randomization in Python 3.3 + * Fixed comment whitespace processing bugs in ply/cpp.py + * Fixed token names in ply/ctokens.py to match rule names + * Changes to functions available in panic mode error recover + * Fixed some problems with line and position tracking and the use + of error symbols + * Change to doc string handling in lex module + * Fixed issue #1: Fixed _tabversion. It should use __tabversion__ + instead of __version__ + * Fixed issue #8: Literals empty list causes IndexError + * Fixed issue #12: Typo in code snippet in documentation + * Fixed issue #10: Correctly escape t_XOREQUAL pattern. +- clean the test and example directories +- remove stray backup files in doc +- remove unneeded executable bit of testlex.py +- remove CFLAGS export: unneeded +- do not drop executable bit of everything in test since + it contains subdirectories +- remove useless clean section +- remove README from package: not provided anymore + +------------------------------------------------------------------- +Wed Jan 2 19:44:41 UTC 2013 - toddrme2178@gmail.com + +- Fix building on SLES + +------------------------------------------------------------------- +Fri May 25 10:04:56 UTC 2012 - toddrme2178@gmail.com + +- spec file cleanups + +------------------------------------------------------------------- +Fri May 25 03:24:34 UTC 2012 - highwaystar.ru@gmail.com + +- python3 package added + +------------------------------------------------------------------- +Mon Feb 13 10:54:05 UTC 2012 - coolo@suse.com + +- patch license to follow spdx.org standard + +------------------------------------------------------------------- +Tue Mar 29 14:02:28 UTC 2011 - saschpe@suse.de + +- Update to 3.4: + + Minor patch to make cpp.py compatible with Python 3. + + Fixed setup.py trove classifiers to properly list PLY as Python + 3 compatible. +- License changed to BSD3c +- Packaged more doc files +- Moved important docs (README, ..) to base package +- Fixed build for non-SUSE distros + +------------------------------------------------------------------- +Tue Sep 14 08:36:55 UTC 2010 - coolo@novell.com + +- Update to 3.3: + + PLY-3.3 is a minor bug fix release, it supports both Python 2 + and Python 3. +- License changed to BSD + +------------------------------------------------------------------- +Sun Aug 9 12:43:26 CEST 2009 - coolo@novell.com + +- Use new python macros + +------------------------------------------------------------------- +Mon Jul 28 13:22:46 CDT 2008 - maw@suse.de + +- Update to version 2.5: + + Various bug fixes + + Some performance improvements + + For a blow-by-blow account of changes, see the file CHANGES + in the package python-ply-doc. + +------------------------------------------------------------------- +Tue Mar 18 00:40:23 CET 2008 - maw@suse.de + +- Import into autobuild +- Add a -doc subpackage +- Add python-ply-shebangs.patch + +------------------------------------------------------------------- +Tue Oct 23 16:52:11 CDT 2007 - maw@suse.de + +- Don't build as noarch. + +------------------------------------------------------------------- +Fri Apr 13 12:08:08 CDT 2007 - maw@suse.de + +- Initial import into the build service +- Rename ply.spec to python-ply.spec as that is what the resultant + package is called. + diff --git a/python-ply.spec b/python-ply.spec new file mode 100644 index 0000000..3f85031 --- /dev/null +++ b/python-ply.spec @@ -0,0 +1,103 @@ +# +# spec file for package python-ply +# +# Copyright (c) 2023 SUSE LLC +# +# 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. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-ply +Version: 3.11 +Release: 0 +Summary: Python Lex & Yacc +License: BSD-3-Clause +Group: Development/Languages/Python +URL: http://www.dabeaz.com/ply/ +Source: https://files.pythonhosted.org/packages/source/p/ply/ply-%{version}.tar.gz +Patch0: python-ply-shebangs.patch +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +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. + +PLY provides most of the standard lex/yacc features including support for empty +productions, precedence rules, error recovery, and support for ambiguous grammars. + +PLY provides extensive error checking. +It is compatible with both Python 2 and Python 3. + +%if 0%{?suse_version} > 1500 +%package -n %{name}-doc +Summary: Python Lex & Yacc +License: LGPL-2.1-or-later +Group: Development/Languages/Python + +%description -n %{name}-doc +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. + +PLY provides most of the standard lex/yacc features including support for empty +productions, precedence rules, error recovery, and support for ambiguous grammars. + +PLY provides extensive error checking. +It is compatible with both Python 2 and Python 3. +%endif + +%prep +%setup -q -n ply-%{version} +%patch0 -p1 +# remove unneeded executable bit +chmod -x test/testlex.py + +# Fix wrong-script-interpreter +find example -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} + + +%fdupes doc +%fdupes example + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +pushd test +%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} +$python -B testlex.py +$python -B testyacc.py +} +popd + +%files %{python_files} +# yay for upstream that puts the license to readme +%license README.md +%doc ANNOUNCE CHANGES README.md TODO +%{python_sitelib}/* + +%if 0%{?suse_version} > 1500 +%files -n %{name}-doc +%endif +%doc doc/ +%doc example/ + +%changelog