Files
haikuports/dev-python/sgmllib3k/sgmllib3k-1.0.0.recipe
Oscar Lesta 2293dddb8c sgmllib3k: drop Python 3.9 support.
Only on-tree user (feedparser) already only targets 3.10.
2025-09-20 00:40:09 -03:00

66 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="2"
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_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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 pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
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
}