diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pdfrw | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pdfrw')
| -rw-r--r-- | dev-python/pdfrw/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/pdfrw/files/pdfrw-fix-import-collections-warning.patch | 48 | ||||
| -rw-r--r-- | dev-python/pdfrw/files/pdfrw-static-fix-import-collections-warning.patch | 26 | ||||
| -rw-r--r-- | dev-python/pdfrw/metadata.xml | 10 | ||||
| -rw-r--r-- | dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild | 67 |
5 files changed, 153 insertions, 0 deletions
diff --git a/dev-python/pdfrw/Manifest b/dev-python/pdfrw/Manifest new file mode 100644 index 000000000000..ab1fb3bd9836 --- /dev/null +++ b/dev-python/pdfrw/Manifest @@ -0,0 +1,2 @@ +DIST pdfrw-0.4-1.gh.tar.gz 143615 BLAKE2B 281dc94c762dcc776e2c9c84609b59ca32387510bcfbec39271a6073533f9ad5d416cf4250b3dcd8564973d197ce090719c5561f58b972c89d463b90723ac8e6 SHA512 f2ef6a966cb1b947425679e6c16e658b5d1dbc13d62fb2e1edc278508b03f6c6847b3c83dab8bcd7df3438e587df066bc16b653461ae402bb8688ddb05f4e886 +DIST pdfrw-static_pdfs-d646009a0e3e71daf13a52ab1029e2230920ebf4.tar.gz 25243391 BLAKE2B 5c491d56c9731352907787bbe10b8b3ac362f0c7892ddcd15a1299d3b2b4bb604662f6231aa22478290992a345e769af2e2c2459a25a16c370ea05fa68101f80 SHA512 9bf1d5ddc8f55b40b50041e745579406bb0036fb7795ac40064aad7cdf592869051ba84a5ab080042e237690bb2f1811b86b2a4424535aa4c367f6e29a0c34eb diff --git a/dev-python/pdfrw/files/pdfrw-fix-import-collections-warning.patch b/dev-python/pdfrw/files/pdfrw-fix-import-collections-warning.patch new file mode 100644 index 000000000000..fe5971264d86 --- /dev/null +++ b/dev-python/pdfrw/files/pdfrw-fix-import-collections-warning.patch @@ -0,0 +1,48 @@ +diff --git a/pdfrw/pdfreader.py b/pdfrw/pdfreader.py +index 2c9c3a2..feb025b 100644 +--- a/pdfrw/pdfreader.py ++++ b/pdfrw/pdfreader.py +@@ -12,9 +12,10 @@ of the object. + ''' + import gc + import binascii +-import collections + import itertools + ++from collections import defaultdict ++ + from .errors import PdfParseError, log + from .tokens import PdfTokens + from .objects import PdfDict, PdfArray, PdfName, PdfObject, PdfIndirect +@@ -340,7 +341,7 @@ class PdfReader(PdfDict): + + def parse_xref_stream(self, source, int=int, range=range, + enumerate=enumerate, islice=itertools.islice, +- defaultdict=collections.defaultdict, ++ defaultdict=defaultdict, + hexlify=binascii.hexlify): + ''' Parse (one of) the cross-reference file section(s) + ''' +diff --git a/tests/expected.py b/tests/expected.py +index d153fc3..62c29aa 100644 +--- a/tests/expected.py ++++ b/tests/expected.py +@@ -12,8 +12,8 @@ + ''' + + import os +-import collections + from pdfrw.py23_diffs import convert_load ++from collections import defaultdict + + root_dir = os.path.dirname(__file__) + result_dir = 'tmp_results' +@@ -28,7 +28,7 @@ for sourcef in ('mytests.txt', 'expected.txt'): + + + def results(): +- results = collections.defaultdict(set) ++ results = defaultdict(set) + with open(expectedf, 'rb') as f: + for line in f: + line = convert_load(line) diff --git a/dev-python/pdfrw/files/pdfrw-static-fix-import-collections-warning.patch b/dev-python/pdfrw/files/pdfrw-static-fix-import-collections-warning.patch new file mode 100644 index 000000000000..95d20358a4b6 --- /dev/null +++ b/dev-python/pdfrw/files/pdfrw-static-fix-import-collections-warning.patch @@ -0,0 +1,26 @@ +diff --git a/__main__.py b/__main__.py +index 55c6e3a..fa9dd47 100644 +--- a/tests/static_pdfs/__main__.py ++++ b/tests/static_pdfs/__main__.py +@@ -14,10 +14,11 @@ Part of github.com/pmaupin/static_pdfs. + + import sys + import os +-import collections + import hashlib + import static_pdfs + ++from collections import defaultdict ++ + params = sys.argv[1:] + + destroy = params == ['destroy'] +@@ -35,7 +36,7 @@ md5. + ''') + + +-found = collections.defaultdict(list) ++found = defaultdict(list) + + sys.stdout.write('\n\nReading PDFs:\n\n') + diff --git a/dev-python/pdfrw/metadata.xml b/dev-python/pdfrw/metadata.xml new file mode 100644 index 000000000000..5e95859f915a --- /dev/null +++ b/dev-python/pdfrw/metadata.xml @@ -0,0 +1,10 @@ +<?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> + <stabilize-allarches /> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild b/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild new file mode 100644 index 000000000000..d03beee69925 --- /dev/null +++ b/dev-python/pdfrw/pdfrw-0.4_p1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2025 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 + +PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4 +DESCRIPTION="PDF file reader/writer library" +HOMEPAGE=" + https://github.com/sarnold/pdfrw/ + https://pypi.org/project/pdfrw/ +" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/sarnold/pdfrw.git" + EGIT_BRANCH="main" + inherit git-r3 +else + MY_PV="${PV/_p/-}" + MY_P="${PN}-${MY_PV}" + SRC_URI=" + https://github.com/sarnold/pdfrw/archive/${MY_PV}.tar.gz + -> ${MY_P}.gh.tar.gz + test? ( + https://github.com/pmaupin/static_pdfs/archive/${PDFS_COMMIT}.tar.gz + -> pdfrw-static_pdfs-${PDFS_COMMIT}.tar.gz + ) + " + KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ppc ppc64 ~sparc x86" + S=${WORKDIR}/${MY_P} +fi + +LICENSE="BSD MIT" +SLOT="0" +IUSE="crypt" + +RDEPEND=" + crypt? ( + dev-python/pycryptodome[${PYTHON_USEDEP}] + ) +" +BDEPEND=" + test? ( + dev-python/reportlab[${PYTHON_USEDEP}] + ) +" + +# unittest would be sufficient but its output is unreadable +distutils_enable_tests pytest + +src_unpack() { + default + if use test; then + mv "static_pdfs-${PDFS_COMMIT}"/* "${MY_P}"/tests/static_pdfs || die + fi +} + +src_prepare() { + eapply "${FILESDIR}/pdfrw-fix-import-collections-warning.patch" + use test && eapply "${FILESDIR}/pdfrw-static-fix-import-collections-warning.patch" + + distutils-r1_src_prepare +} |
