summaryrefslogtreecommitdiff
path: root/dev-python/stapler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-01 21:50:29 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-01 21:50:29 +0000
commitf4271cea898f88d5785d4a92396a24e916ac301f (patch)
tree6cec9449f18dbf6a5172b553163d441d0ac83443 /dev-python/stapler
parente590456a8f7fef7ac4410bcf8f1e1486848e0243 (diff)
gentoo auto-resync : 01:11:2023 - 21:50:29
Diffstat (limited to 'dev-python/stapler')
-rw-r--r--dev-python/stapler/Manifest2
-rw-r--r--dev-python/stapler/files/stapler-1.0.0_p20220330-PyPDF2-to-pypdf-r1.patch52
-rw-r--r--dev-python/stapler/stapler-1.0.0_p20220330-r4.ebuild39
3 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/stapler/Manifest b/dev-python/stapler/Manifest
index 11e392c40a88..4afdc6ddf334 100644
--- a/dev-python/stapler/Manifest
+++ b/dev-python/stapler/Manifest
@@ -1,7 +1,9 @@
+AUX stapler-1.0.0_p20220330-PyPDF2-to-pypdf-r1.patch 1268 BLAKE2B 9449bd1e6b8a53c227a1be0007554efbb20e9426bf265765d0aba21982353d0b2098d312436ec202fc94c103f63da0b8f07ee7066d6b4ab04949c188dca38ec6 SHA512 06223d70535daae4277164a12dea5bf326b3dbc97960f1cecd76af7de8aade7461aeea409d3c0e361fbfe53a77b9475746ba5614d7694308e5263d8f19b1a7d5
AUX stapler-1.0.0_p20220330-PyPDF2-to-pypdf.patch 987 BLAKE2B 2bd426a54ef89c0ee92c86b076d5d711bcb83abe5c2cc01124a02f9259bd4a2300421ae5d6844a7510d2c81bc7d7fabc9442bcc3ae20855ab957ef64c49358e9 SHA512 f6764625b1eede538be66963d39fba1846a5b128226ef8814eafe9d4320acd462de1d9d40a6a58635e7f931723e6796a77b3cdab2a58c5014c71741f5dfb220b
AUX stapler-1.0.0_p20220330-fix-tests-for-PyPDF2-2.x.patch 317 BLAKE2B 7000903663d5843388203d4cb4984a93c93cd1524a877df0c1d8a474805b4b85701f903ab813b0afa9ef8b8bef3faae771822b6e28522e17cda014299b933d16 SHA512 c7f35ae69db4eb5d61d63a2a56e15315444696168a080dc81d2839f815d975c2da92cdf36f39e7bd8a38958889b1f588dce38c435fcec7fc5e7cd62e3b25befe
AUX stapler-1.0.0_p20220330-port-to-PyPDF2-3.0.0.patch 11876 BLAKE2B bcb22eece9e360e32bc6ef40ccdaac176fa6c2b265d962c52b399497f8347291f597a6a3b806fdf315937509d32b68bed79ccc580b2b4eb4789a5b7d4fbba2a6 SHA512 698cdbf12d36549c7e35c636b76e98bffe0f5b826bda8872f6a06a0cdb815bd855a63dc250a4f30aeb459d572db4fd54af81371664fd48cbf35aaf9b3f759061
AUX stapler-1.0.0_p20220330-use-poetry-core-backend-for-PEP517.patch 1080 BLAKE2B 6342f8cc0931736aa6868749552da18d1c41656815f954826c6e9b2b1be0a18b45f8a8baac95d3e0f364c7c53ec7c6efb888a67b162134a9165f387e6d0c7824 SHA512 26b8d141dd765be117e9df42b78d79f68f1593e09420badb10793df007d031189627d2b3bab36635228a4337bb5b9c199472be41953be3973dd20bdddbffed11
DIST stapler-382f1edc62296e071093a5419811a2fca9d78d93.tar.gz 43659 BLAKE2B 10c24868d51086b37dd2d517aa84e3c3fc0b6becc7a29ebf496646bdd65494eb0c43488f725241d7bd7b3083ce5703538db3e05de9976a2e5029731fc2e645d2 SHA512 acd2dfec0dfab46b2cf6b440cba6c0db5399be2ba2194ca12530c311c6c5a8028614164af45b850061e7d22cbec33458ceff7757f1b104c722228dc2d02cae0a
EBUILD stapler-1.0.0_p20220330-r3.ebuild 911 BLAKE2B bb3b8f37eb2dbcd8c25848de02da18f3506ba53fa2c28c5ce074a1be7c63ee7dfc3e820644705da545087ea15031bff7fbe1905117db39e1403af0a1f49a0dc1 SHA512 a5163a4abaedd78cbc4c56692a4ac31c57eb2a5d534ea9298cd774abf75674840f24ab9d57b7440f6baef232372683da3b014ba7aeab7897985aea8efae0e8d7
+EBUILD stapler-1.0.0_p20220330-r4.ebuild 914 BLAKE2B d1e1aaeae08b8512654c8f0368aa684abc39da888035e5353f099e14c7e567569d90e02a6d48152fa7d238df4fc1edbec4322d4f586b99ca18ad8d68eef4704b SHA512 c4658a14aeed55349a97d61e8b8e23edb49dfd3ddd2df18f1de5aecd34c836d33ca8963c25c4d4212d6a4db936e91b3cf98aa838f964172fafdb67922ce8e010
MISC metadata.xml 398 BLAKE2B 3c566702150e77dd0ba58f667336f57c0347422496edeb4fdd53e0f131cb966d15781a5d5b5e13211b2385e410a1d12c064c3ffe66056395b6eeeccdcca1cc72 SHA512 802c118d28a07f7fba6558aaa8f60aef0ebf137395af566e273ba1d218712d1835c74f82c5160f12d120d8776cbaf4fe7d09827a84c1a5e234fef307e0835a18
diff --git a/dev-python/stapler/files/stapler-1.0.0_p20220330-PyPDF2-to-pypdf-r1.patch b/dev-python/stapler/files/stapler-1.0.0_p20220330-PyPDF2-to-pypdf-r1.patch
new file mode 100644
index 000000000000..8e4a30327ee5
--- /dev/null
+++ b/dev-python/stapler/files/stapler-1.0.0_p20220330-PyPDF2-to-pypdf-r1.patch
@@ -0,0 +1,52 @@
+diff --git a/staplelib/commands.py b/staplelib/commands.py
+index caf75f9..e67f419 100644
+--- a/staplelib/commands.py
++++ b/staplelib/commands.py
+@@ -4,7 +4,7 @@ import math
+ import os
+
+ try:
+- from PyPDF2 import PdfWriter, PdfReader
++ from pypdf import PdfWriter, PdfReader
+ except:
+ from pyPdf import PdfWriter, PdfReader
+
+diff --git a/staplelib/iohelper.py b/staplelib/iohelper.py
+index 8df365c..5474898 100644
+--- a/staplelib/iohelper.py
++++ b/staplelib/iohelper.py
+@@ -7,7 +7,7 @@ import re
+ import sys
+
+ try:
+- from PyPDF2 import PdfWriter, PdfReader
++ from pypdf import PdfWriter, PdfReader
+ except ImportError:
+ from pyPdf import PdfWriter, PdfReader
+
+diff --git a/staplelib/tests.py b/staplelib/tests.py
+index 86db178..423406d 100755
+--- a/staplelib/tests.py
++++ b/staplelib/tests.py
+@@ -5,7 +5,7 @@ import shutil
+ import tempfile
+ import unittest
+
+-from PyPDF2 import PdfReader
++from pypdf import PdfReader
+
+ from staplelib import main, CommandError
+
+diff --git a/pyproject.toml b/pyproject.toml
+index d34823e..765db3d 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -15,7 +15,7 @@ packages = [
+
+ [tool.poetry.dependencies]
+ python = "^3.4"
+-PyPDF2 = ">=1.26"
++pypdf = ">=3.1.0"
+
+ [tool.poetry.dev-dependencies]
+ pytest = "*"
diff --git a/dev-python/stapler/stapler-1.0.0_p20220330-r4.ebuild b/dev-python/stapler/stapler-1.0.0_p20220330-r4.ebuild
new file mode 100644
index 000000000000..9b6c4310cc1a
--- /dev/null
+++ b/dev-python/stapler/stapler-1.0.0_p20220330-r4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+EGIT_COMMIT="382f1edc62296e071093a5419811a2fca9d78d93"
+MY_P="${PN}-${EGIT_COMMIT}"
+DESCRIPTION="Suite of tools for PDF files manipulation written in Python"
+HOMEPAGE="
+ https://github.com/hellerbarde/stapler/
+ https://pypi.org/project/stapler/
+"
+SRC_URI="
+ https://github.com/hellerbarde/stapler/archive/${EGIT_COMMIT}.tar.gz
+ -> ${MY_P}.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/pypdf[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests unittest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-tests-for-PyPDF2-2.x.patch
+ "${FILESDIR}"/${P}-port-to-PyPDF2-3.0.0.patch
+ "${FILESDIR}"/${P}-use-poetry-core-backend-for-PEP517.patch
+ "${FILESDIR}"/${P}-PyPDF2-to-pypdf-r1.patch
+)