app-text/pdfminer: add 20221105

Fix doc and example installation, fix version generation. Add
python3_12, minor fixes to ebuild.

Closes: https://bugs.gentoo.org/848990
Co-authored-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32720
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
Azamat H. Hackimov
2023-09-11 12:59:24 +03:00
committed by Florian Schmaus
parent 095dd6e718
commit 277bf06c25
2 changed files with 45 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST pdfminer-20220506.tar.gz 10853104 BLAKE2B b6008db789973fb69537801b8e928761bd0a949cc72ddf380fd71b6373913f6a689b71bee159e6991e99c196b7e8a1fac5530d2bf9c577e53b8b556bed00b85a SHA512 b81916c70f22f3408cf41a50d35937f950ee6205f59fa03603bc7a78d1b1b037311ebaf5661f6d46b9d4190f2f56189fc28b714463dc5854328c14f97fbc28c4
DIST pdfminer.six-20221105.gh.tar.gz 10857730 BLAKE2B dd9282bfc3c636676f087e6ffc2cfb137f66eee18427f08de488c7bdc13bd27b6cc674d3b75c93d1566668272ee4111e3347664a70152bd4b2f7e4e63664d01b SHA512 72034a75005c91100274f86baa4c8884caad86aacf94ca9d0d5a51d8b3c772aa0bcd766416bed9e26df00bd9a2be585649eaa24321735f532e40a3871e19c6df

View File

@@ -0,0 +1,44 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..12} )
inherit distutils-r1
MY_P="${PN}.six-${PV}"
DESCRIPTION="Python tool for extracting information from PDF documents"
HOMEPAGE="https://pdfminersix.readthedocs.io/en/latest/"
# Release tarballs lack tests
SRC_URI="https://github.com/pdfminer/pdfminer.six/archive/refs/tags/${PV}.tar.gz -> ${MY_P}.gh.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples"
RDEPEND=">=dev-python/charset-normalizer-2.0.0[${PYTHON_USEDEP}]
>=dev-python/cryptography-36.0.0[${PYTHON_USEDEP}]"
distutils_enable_sphinx docs "dev-python/sphinx-argparse"
distutils_enable_tests pytest
python_prepare_all() {
sed -i -e "s:__VERSION__:${PV}:g" pdfminer/__init__.py || die
distutils-r1_python_prepare_all
}
python_compile_all() {
# Non-standard doc generation
if use doc; then
PYTHONPATH="${PYTHONPATH}:${BUILD_DIR}/install" sphinx-build docs/source "${WORKDIR}"/_docs
HTML_DOCS=( "${WORKDIR}"/_docs/. )
fi
}
python_install_all() {
use examples && dodoc -r samples
distutils-r1_python_install_all
}