summaryrefslogtreecommitdiff
path: root/dev-python/ply
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/ply
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/ply')
-rw-r--r--dev-python/ply/Manifest2
-rw-r--r--dev-python/ply/files/3.6-picklefile-IOError.patch24
-rw-r--r--dev-python/ply/files/ply-3.11-test-py315.patch26
-rw-r--r--dev-python/ply/metadata.xml23
-rw-r--r--dev-python/ply/ply-3.11-r2.ebuild48
5 files changed, 123 insertions, 0 deletions
diff --git a/dev-python/ply/Manifest b/dev-python/ply/Manifest
new file mode 100644
index 000000000000..d70f495e3f43
--- /dev/null
+++ b/dev-python/ply/Manifest
@@ -0,0 +1,2 @@
+DIST ply-3.11-py3.12-assert.patch.xz 3832 BLAKE2B 5872a2f6c71ee093dfcb12a3a9b80c54091ba2a3d331948ccd88918fd263569a413e87962c607368f23f79abefd0f98738f1e1a33413832983ff3057c1ea021b SHA512 bc145cef28a0947773ee13df4a86fd60b04ebe8a06e563059a32eff55475f54bb99fb7cf7ef73c463d92b8795013b7c9f1aebcdf5a6c4f98d71675710f496b97
+DIST ply-3.11.tar.gz 159130 BLAKE2B 58c50b9dad445ad83a64aaa8174ed4602b36f5c8df33a7d62590a92388c4a21c9800599c1d4e4db6f02630e8dee4c8482611e26498e4aa8ccdb2cf3453ae1db4 SHA512 37e39a4f930874933223be58a3da7f259e155b75135f1edd47069b3b40e5e96af883ebf1c8a1bbd32f914a9e92cfc12e29fec05cf61b518f46c1d37421b20008
diff --git a/dev-python/ply/files/3.6-picklefile-IOError.patch b/dev-python/ply/files/3.6-picklefile-IOError.patch
new file mode 100644
index 000000000000..85b39494a6fd
--- /dev/null
+++ b/dev-python/ply/files/3.6-picklefile-IOError.patch
@@ -0,0 +1,24 @@
+From f50768b0b2176998675e728d84ac05f0eef19614 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 17 May 2015 12:14:16 -0400
+Subject: [PATCH] Catch/ignore IOError when opening picklefile for reading in
+ yacc.yacc()
+
+Should resolve #66.
+---
+ ply/yacc.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ply/yacc.py b/ply/yacc.py
+index eb02cc2..2835c90 100644
+--- a/ply/yacc.py
++++ b/ply/yacc.py
+@@ -3265,6 +3265,8 @@ def yacc(method='LALR', debug=yaccdebug, module=None, tabmodule=tab_module, star
+ errorlog.warning(str(e))
+ except ImportError:
+ pass
++ except IOError:
++ pass
+
+ if debuglog is None:
+ if debug:
diff --git a/dev-python/ply/files/ply-3.11-test-py315.patch b/dev-python/ply/files/ply-3.11-test-py315.patch
new file mode 100644
index 000000000000..b3cab73a321e
--- /dev/null
+++ b/dev-python/ply/files/ply-3.11-test-py315.patch
@@ -0,0 +1,26 @@
+From 3ef4ef231342ca00f7f97772fea451c66aced03b Mon Sep 17 00:00:00 2001
+From: Tom spot Callaway <spotaws@amazon.com>
+Date: Thu, 18 Dec 2025 10:39:22 -0500
+Subject: [PATCH] Fix testyacc.py to work with Python 3.15
+
+Signed-off-by: Tom spot Callaway <spotaws@amazon.com>
+---
+ tests/testyacc.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/test/testyacc.py b/test/testyacc.py
+index b488bf7..14ddef7 100644
+--- a/test/testyacc.py
++++ b/test/testyacc.py
+@@ -21,7 +21,10 @@ def make_pymodule_path(filename):
+ file = os.path.basename(filename)
+ mod, ext = os.path.splitext(file)
+
+- if sys.hexversion >= 0x3040000:
++ if sys.hexversion >= 0x3050000:
++ import importlib.util
++ fullpath = importlib.util.cache_from_source(filename)
++ elif sys.hexversion >= 0x3040000:
+ import importlib.util
+ fullpath = importlib.util.cache_from_source(filename, ext=='.pyc')
+ elif sys.hexversion >= 0x3020000:
diff --git a/dev-python/ply/metadata.xml b/dev-python/ply/metadata.xml
new file mode 100644
index 000000000000..544e1d74064b
--- /dev/null
+++ b/dev-python/ply/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription>
+PLY is a Python-only implementation of the popular compiler construction
+tools lex and yacc. The implementation borrows ideas from a number of
+previous efforts; most notably John Aycock's SPARK toolkit. However,
+the overall flavor of the implementation is more closely modeled after
+the C version of lex and yacc. The other significant feature of PLY is
+that it provides extensive input validation and error reporting--much
+more so than other Python parsing tools.
+ </longdescription>
+ <longdescription lang="ja">
+PLYはLexとYaccの有名なコンパイラ・コンストラクション・ツールのPython言語実装です
+。この実装は以前の試みから幾つものアイディアを借りています。そのほとんどがJohn AycockのSPARKツールキットからです。しかしながら、実装の全体像はC言語によるLexとYaccにより近いモデルです。PLYの他の重要点は幅広い入力バリデーションとエラー報告を提供する点です。 -- その二点は他のPython言語パーサーより優れています。
+ </longdescription>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/ply/ply-3.11-r2.ebuild b/dev-python/ply/ply-3.11-r2.ebuild
new file mode 100644
index 000000000000..8514e355de83
--- /dev/null
+++ b/dev-python/ply/ply-3.11-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python Lex-Yacc library"
+HOMEPAGE="
+ https://www.dabeaz.com/ply/
+ https://github.com/dabeaz/ply/
+ https://pypi.org/project/ply/
+"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-py3.12-assert.patch.xz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
+IUSE="examples"
+
+DOCS=( ANNOUNCE CHANGES TODO )
+
+PATCHES=(
+ "${FILESDIR}/3.6-picklefile-IOError.patch"
+ # https://github.com/dabeaz/ply/pull/318
+ "${FILESDIR}/${P}-test-py315.patch"
+ "${WORKDIR}/${P}-py3.12-assert.patch"
+)
+
+python_test() {
+ # Checks for pyc/pyo files
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ cd test || die
+ local t
+ for t in testlex.py testyacc.py; do
+ "${EPYTHON}" "${t}" -v || die "${t} fails with ${EPYTHON}"
+ done
+}
+
+python_install_all() {
+ local HTML_DOCS=( doc/. )
+ use examples && dodoc -r example
+ distutils-r1_python_install_all
+}