0
0
Fork 0
haikuports/dev-python/beautifulsoup/beautifulsoup-4.9.3.recipe

70 lines
1.9 KiB
Bash

SUMMARY="Python library for iterating, searching, and modifying an HTML/XML parse tree"
DESCRIPTION="
Beautiful Soup is a Python HTML/XML parser designed for quick
turnaround projects like screen-scraping.
Two features make it powerful:
it won't choke if you give it bad markup and it provides
a few simple methods and Pythonic idioms for navigating and
searching a parse tree: a toolkit for dissecting a document and
extracting what you need"
HOMEPAGE="https://bugs.launchpad.net/beautifulsoup/
https://pypi.python.org/pypi/beautifulsoup4
https://www.crummy.com/software/BeautifulSoup/bs4/"
COPYRIGHT="2004-2015 Leonard Richardson
2006-2013 James Graham and other contributors"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pypi.org/packages/source/b/beautifulsoup4/beautifulsoup4-$portVersion.tar.gz"
CHECKSUM_SHA256="84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25"
SOURCE_DIR="beautifulsoup4-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python python3 python38 python39)
PYTHON_VERSIONS=(2.7 3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$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
}