Gentoo Archives: gentoo-commits

From: Steve Arnold <nerdboy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pdfrw/
Date: Thu, 28 Jan 2021 20:27:12
Message-Id: 1611865616.c63c04acdcde27458756eda64bc32646b7bf9e65.nerdboy@gentoo
1 commit: c63c04acdcde27458756eda64bc32646b7bf9e65
2 Author: Steve Arnold <nerdboy <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 28 20:26:07 2021 +0000
4 Commit: Steve Arnold <nerdboy <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 28 20:26:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c63c04ac
7
8 dev-python/pdfrw: add upstream cleanup patch release
9
10 * not including removal bug closure here pending feedback
11
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>
14
15 dev-python/pdfrw/Manifest | 2 +-
16 dev-python/pdfrw/metadata.xml | 2 +-
17 dev-python/pdfrw/pdfrw-0.4.ebuild | 53 --------------------------------
18 dev-python/pdfrw/pdfrw-0.4_p1.ebuild | 58 ++++++++++++++++++++++++++++++++++++
19 4 files changed, 60 insertions(+), 55 deletions(-)
20
21 diff --git a/dev-python/pdfrw/Manifest b/dev-python/pdfrw/Manifest
22 index b435bb703dc..17ba1dd8c36 100644
23 --- a/dev-python/pdfrw/Manifest
24 +++ b/dev-python/pdfrw/Manifest
25 @@ -1,2 +1,2 @@
26 -DIST pdfrw-0.4.tar.gz 95402 BLAKE2B 00f01f8d4cca9c5306d08094639d4cb10c53aca1c81b6c65f5639c8862a067e562c164523cc58abddb06b39dabcc50c2fbcdcf04a291309cac709cbfd0cf4673 SHA512 6c0b629e837f9bd479a288bcd040952b98920da345113bf90167becbdf2f90a9d6c082c5e7988c68118bd62a2a5a0d22f98523407996531bb5d3031e847e10b0
27 +DIST pdfrw-0.4-1.tar.gz 143615 BLAKE2B 281dc94c762dcc776e2c9c84609b59ca32387510bcfbec39271a6073533f9ad5d416cf4250b3dcd8564973d197ce090719c5561f58b972c89d463b90723ac8e6 SHA512 f2ef6a966cb1b947425679e6c16e658b5d1dbc13d62fb2e1edc278508b03f6c6847b3c83dab8bcd7df3438e587df066bc16b653461ae402bb8688ddb05f4e886
28 DIST pdfrw-static_pdfs-d646009a0e3e71daf13a52ab1029e2230920ebf4.tar.gz 25243391 BLAKE2B 5c491d56c9731352907787bbe10b8b3ac362f0c7892ddcd15a1299d3b2b4bb604662f6231aa22478290992a345e769af2e2c2459a25a16c370ea05fa68101f80 SHA512 9bf1d5ddc8f55b40b50041e745579406bb0036fb7795ac40064aad7cdf592869051ba84a5ab080042e237690bb2f1811b86b2a4424535aa4c367f6e29a0c34eb
29
30 diff --git a/dev-python/pdfrw/metadata.xml b/dev-python/pdfrw/metadata.xml
31 index d95f88bab1f..fe2a825dbce 100644
32 --- a/dev-python/pdfrw/metadata.xml
33 +++ b/dev-python/pdfrw/metadata.xml
34 @@ -8,6 +8,6 @@
35 <stabilize-allarches/>
36 <upstream>
37 <remote-id type="pypi">pdfrw</remote-id>
38 - <remote-id type="github">pmaupin/pdfrw</remote-id>
39 + <remote-id type="github">sarnold/pdfrw</remote-id>
40 </upstream>
41 </pkgmetadata>
42
43 diff --git a/dev-python/pdfrw/pdfrw-0.4.ebuild b/dev-python/pdfrw/pdfrw-0.4.ebuild
44 deleted file mode 100644
45 index 9a00f180cbc..00000000000
46 --- a/dev-python/pdfrw/pdfrw-0.4.ebuild
47 +++ /dev/null
48 @@ -1,53 +0,0 @@
49 -# Copyright 1999-2020 Gentoo Authors
50 -# Distributed under the terms of the GNU General Public License v2
51 -
52 -EAPI=7
53 -
54 -PYTHON_COMPAT=( python3_{6,7,8} )
55 -
56 -inherit distutils-r1
57 -
58 -PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4
59 -DESCRIPTION="PDF file reader/writer library"
60 -HOMEPAGE="https://github.com/pmaupin/pdfrw"
61 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
62 - test? (
63 - https://github.com/pmaupin/static_pdfs/archive/${PDFS_COMMIT}.tar.gz
64 - -> pdfrw-static_pdfs-${PDFS_COMMIT}.tar.gz
65 - )"
66 -
67 -LICENSE="BSD MIT"
68 -SLOT="0"
69 -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86"
70 -
71 -BDEPEND="
72 - test? ( dev-python/reportlab[${PYTHON_USEDEP}] )"
73 -
74 -# unittest would be sufficient but its output is unreadable
75 -distutils_enable_tests pytest
76 -
77 -src_unpack() {
78 - default
79 - if use test; then
80 - mv "static_pdfs-${PDFS_COMMIT}"/* "${P}"/tests/static_pdfs/ || die
81 - fi
82 -}
83 -
84 -src_prepare() {
85 - # broken upstream (sensitive to reportlab version?)
86 - sed -e 's:test_rl1_platypus:_&:' \
87 - -i tests/test_examples.py || die
88 - # fails with py3
89 - sed -e '/repaginate\/7037/s:[0-9a-f]*$:skip:' \
90 - -e '/.*\/72eb/s:[0-9a-f]*$:skip:' \
91 - -i tests/expected.txt || die
92 - # fix py3.7+ some
93 - sed -i -e 's:raise StopIteration:return:' pdfrw/tokens.py || die
94 -
95 - distutils-r1_src_prepare
96 -}
97 -
98 -src_test() {
99 - cd tests || die
100 - distutils-r1_src_test
101 -}
102
103 diff --git a/dev-python/pdfrw/pdfrw-0.4_p1.ebuild b/dev-python/pdfrw/pdfrw-0.4_p1.ebuild
104 new file mode 100644
105 index 00000000000..00a4ad7b5a1
106 --- /dev/null
107 +++ b/dev-python/pdfrw/pdfrw-0.4_p1.ebuild
108 @@ -0,0 +1,58 @@
109 +# Copyright 1999-2021 Gentoo Authors
110 +# Distributed under the terms of the GNU General Public License v2
111 +
112 +EAPI=7
113 +
114 +PYTHON_COMPAT=( python3_{6..9} )
115 +
116 +inherit distutils-r1
117 +
118 +PDFS_COMMIT=d646009a0e3e71daf13a52ab1029e2230920ebf4
119 +DESCRIPTION="PDF file reader/writer library"
120 +HOMEPAGE="https://github.com/pmaupin/pdfrw"
121 +
122 +if [[ ${PV} = 9999* ]]; then
123 + EGIT_REPO_URI="https://github.com/sarnold/hexdump.git"
124 + EGIT_BRANCH="main"
125 + inherit git-r3
126 + KEYWORDS=""
127 +else
128 + MY_PV="${PV/_p/-}"
129 + MY_P="${PN}-${MY_PV}"
130 + SRC_URI="https://github.com/sarnold/${PN}/archive/${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz
131 + test? ( https://github.com/pmaupin/static_pdfs/archive/${PDFS_COMMIT}.tar.gz
132 + -> pdfrw-static_pdfs-${PDFS_COMMIT}.tar.gz )"
133 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
134 + S="${WORKDIR}/${MY_P}"
135 +fi
136 +
137 +LICENSE="BSD MIT"
138 +SLOT="0"
139 +IUSE="crypt test"
140 +
141 +BDEPEND="dev-python/pillow[${PYTHON_USEDEP}]
142 + crypt? ( dev-python/pycryptodome[${PYTHON_USEDEP}] )
143 + test? ( dev-python/reportlab[${PYTHON_USEDEP}]
144 + >=dev-python/pytest-3.0.3[${PYTHON_USEDEP}] )"
145 +
146 +RESTRICT="!test? ( test )"
147 +
148 +# unittest would be sufficient but its output is unreadable
149 +distutils_enable_tests pytest
150 +
151 +src_unpack() {
152 + default
153 + if use test; then
154 + mv "static_pdfs-${PDFS_COMMIT}"/* "${MY_P}"/tests/static_pdfs || die
155 + fi
156 +}
157 +
158 +src_prepare() {
159 + # broken upstream (sensitive to reportlab version?)
160 + #sed -e 's:test_rl1_platypus:_&:' \
161 + # -i tests/test_examples.py || die
162 + eapply "${FILESDIR}/pdfrw-fix-import-collections-warning.patch"
163 + use test && eapply "${FILESDIR}/pdfrw-static-fix-import-collections-warning.patch"
164 +
165 + distutils-r1_src_prepare
166 +}