mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
pypdf: new python recipe (#10892)
This commit is contained in:
68
dev-python/pypdf/pypdf-4.3.1.recipe
Normal file
68
dev-python/pypdf/pypdf-4.3.1.recipe
Normal file
@@ -0,0 +1,68 @@
|
||||
SUMMARY="A pure-python PDF library"
|
||||
DESCRIPTION="pypdf is a free and open-source pure-python PDF library capable of splitting, \
|
||||
merging, cropping, and transforming the pages of PDF files. It can also add custom data, viewing \
|
||||
options, and passwords to PDF files. pypdf can retrieve text and metadata from PDFs as well."
|
||||
HOMEPAGE="https://pypdf.readthedocs.io/"
|
||||
COPYRIGHT="2006-2008, Mathieu Fenniak
|
||||
2007, Ashish Kulkarni
|
||||
2014, Steve Witham"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
pypiVersion="3c/60/eccdd92dd4af3e4bea6d6a342f7588c618a15b9bec4b968af581e498bcc4"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/pypdf-$portVersion-py3-none-any.whl#noarchive"
|
||||
CHECKSUM_SHA256="64b31da97eda0771ef22edb1bfecd5deee4b72c3d1736b7df2689805076d6418"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
DISABLE_SOURCE_PACKAGE="yes"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\"
|
||||
REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
if [ ${pythonVersion:2} -lt 11 ]; then
|
||||
eval "REQUIRES_$pythonPackage+=\"
|
||||
typing_extensions_$pythonPackage
|
||||
\""
|
||||
fi
|
||||
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
installer_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
|
||||
$python -m installer -p $prefix pypdf-$portVersion-py3-none-any.whl
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user