Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypdf/
Date: Sun, 01 Jan 2023 07:26:45
Message-Id: 1672557946.297848f25301c7e7e633fd1660732d355c407b5f.mgorny@gentoo
1 commit: 297848f25301c7e7e633fd1660732d355c407b5f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 1 07:23:23 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 1 07:25:46 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=297848f2
7
8 dev-python/pypdf: Rename of dev-python/PyPDF2, v3.2.0
9
10 Upstream has renamed PyPDF2 back into pypdf. Since this naturally
11 breaks all reverse dependencies, let's add it as a separate package
12 instead of doing a pkgmove.
13
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 dev-python/pypdf/Manifest | 2 ++
17 dev-python/pypdf/metadata.xml | 12 +++++++
18 dev-python/pypdf/pypdf-3.2.0.ebuild | 62 +++++++++++++++++++++++++++++++++++++
19 3 files changed, 76 insertions(+)
20
21 diff --git a/dev-python/pypdf/Manifest b/dev-python/pypdf/Manifest
22 new file mode 100644
23 index 000000000000..7a54a7d699ae
24 --- /dev/null
25 +++ b/dev-python/pypdf/Manifest
26 @@ -0,0 +1,2 @@
27 +DIST pypdf-3.2.0.gh.tar.gz 6618810 BLAKE2B 33ade8743339415b58f2397a55972479bdfd6ed87c68ea9cc1c9f05c80210a6265e97f1f26dfc3bd2bd74c6c11ab45d8a3d9ded1b150e96f804f9893c74fb517 SHA512 a3db36086733f6bfdfd4e6b56dc976e30c2940362fcf1e8b4c61b3c8d421c870821eb7c5dcbc41e6362f487d474c5d2bcfbe6b9aabd8c496d3a030aa40d1af57
28 +DIST pypdf-sample-files-0fe84b30ed33ff3daa9293e44349b8618f135699.gh.tar.gz 9027166 BLAKE2B 912bb9fbd632bd0ad2cc2e865a1e6870ad7064aa2cf4d6f96217f63ac685e9a511f0bb20c22d48ae970a2eb171b27a0fa680fa42892425531f69735840cf741b SHA512 07a71a3566dabcea5dc8a549949d0f0c0f9483d5d9f85851d6e4e702dd374b348469a80e5300d18983e560ee9a44d0639b55eb338023b9ebbdb26c6f8c455e07
29
30 diff --git a/dev-python/pypdf/metadata.xml b/dev-python/pypdf/metadata.xml
31 new file mode 100644
32 index 000000000000..75594da4e373
33 --- /dev/null
34 +++ b/dev-python/pypdf/metadata.xml
35 @@ -0,0 +1,12 @@
36 +<?xml version="1.0" encoding="UTF-8"?>
37 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
38 +<pkgmetadata>
39 + <maintainer type="project">
40 + <email>python@g.o</email>
41 + <name>Python</name>
42 + </maintainer>
43 + <upstream>
44 + <remote-id type="pypi">pypdf</remote-id>
45 + <remote-id type="github">py-pdf/pypdf</remote-id>
46 + </upstream>
47 +</pkgmetadata>
48
49 diff --git a/dev-python/pypdf/pypdf-3.2.0.ebuild b/dev-python/pypdf/pypdf-3.2.0.ebuild
50 new file mode 100644
51 index 000000000000..14f4890dfa3f
52 --- /dev/null
53 +++ b/dev-python/pypdf/pypdf-3.2.0.ebuild
54 @@ -0,0 +1,62 @@
55 +# Copyright 1999-2023 Gentoo Authors
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +EAPI=8
59 +
60 +DISTUTILS_USE_PEP517=flit
61 +PYTHON_COMPAT=( python3_{8..11} )
62 +
63 +inherit distutils-r1
64 +
65 +SAMPLE_COMMIT=0fe84b30ed33ff3daa9293e44349b8618f135699
66 +DESCRIPTION="Python library to work with PDF files"
67 +HOMEPAGE="
68 + https://pypi.org/project/pypdf/
69 + https://github.com/py-pdf/pypdf/
70 +"
71 +SRC_URI="
72 + https://github.com/py-pdf/pypdf/archive/${PV}.tar.gz
73 + -> ${P}.gh.tar.gz
74 + test? (
75 + https://github.com/py-pdf/sample-files/archive/${SAMPLE_COMMIT}.tar.gz
76 + -> ${PN}-sample-files-${SAMPLE_COMMIT}.gh.tar.gz
77 + )
78 +"
79 +S=${WORKDIR}/pypdf-${PV}
80 +
81 +LICENSE="BSD-2"
82 +SLOT="0"
83 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
84 +RESTRICT="test"
85 +# 150+ tests require network, too many to deselect
86 +PROPERTIES="test_network"
87 +
88 +RDEPEND="
89 + $(python_gen_cond_dep '
90 + dev-python/typing-extensions[${PYTHON_USEDEP}]
91 + ' 3.8 3.9)
92 +"
93 +BDEPEND="
94 + dev-python/pillow[${PYTHON_USEDEP}]
95 + test? (
96 + dev-python/pycryptodome[${PYTHON_USEDEP}]
97 + )
98 +"
99 +
100 +distutils_enable_tests pytest
101 +
102 +EPYTEST_DESELECT=(
103 + # rely on -Werror
104 + tests/test_utils.py::test_deprecate_no_replacement
105 + tests/test_workflows.py::test_orientations
106 + # dead URL
107 + # https://github.com/py-pdf/pypdf/issues/1526
108 + tests/test_xmp.py::test_issue585
109 +)
110 +
111 +src_unpack() {
112 + default
113 + if use test; then
114 + mv "sample-files-${SAMPLE_COMMIT}"/* "${S}"/sample-files/ || die
115 + fi
116 +}