Files
haikuports/dev-python/sgmllib3k/sgmllib3k-1.0.0.recipe
OscarL 4df5ee2a10 sgmllib3k: new recipe. (#9366)
Needed only for feedparser >= 6.0.
2023-09-06 05:37:03 +00:00

68 lines
1.5 KiB
Bash

SUMMARY="Py3k port of sgmllib"
DESCRIPTION="This is a quick and dirty port of the sgmllib module that was dropped on Python 3.x.
It was just ran through 2to3, and published. This package is UNMAINTAINED. Do not use on new code!
Only here because feedparser (and thus Calibre) still require it."
HOMEPAGE="https://pypi.org/project/sgmllib3k/"
COPYRIGHT="2010 Hardcoded Software"
LICENSE="Python"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/s/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="7868fb1c8bfa764c1ac563d3cf369c381d1325d36124933a726f29fcdaa812e9"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}