SUMMARY="Python implementation of Markdown" DESCRIPTION="This is a Python implementation of John Gruber’s Markdown. \ It is almost completely compliant with the reference implementation, though \ there are a few known issues." HOMEPAGE="https://pythonhosted.org/Markdown/ https://pypi.python.org/pypi/Markdown/" COPYRIGHT="2007, 2008 The Python Markdown Project 2004, 2005, 2006 Yuri Takhteyev 2004 Manfred Stienstra" LICENSE="BSD (3-clause)" REVISION="1" SOURCE_URI="https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-$portVersion.tar.gz" CHECKSUM_SHA256="5ad7180c3ec16422a764568ad6409ec82460c40d1631591fa53d597033cc98bf" SOURCE_DIR="Markdown-$portVersion" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " PYTHON_VERSIONS=(3.10) defaultVersion=3.10 for pythonVersion in ${PYTHON_VERSIONS[@]}; do pythonPackage=python${pythonVersion//.} eval "PROVIDES_${pythonPackage}=\" ${portName}_$pythonPackage = $portVersion cmd:markdown_py_$pythonVersion \"" # Provide non-suffixed cmd only for the default Python version if [ $pythonVersion = $defaultVersion ]; then eval "PROVIDES_$pythonPackage+=\" cmd:markdown_py = $portVersion \"" fi 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 # Version suffix all the scripts for f in $binDir/*; do mv $f $f-$pythonVersion done # And provide suffix-less symlinks for the default version if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do ln -sr $f ${f%-$pythonVersion} done fi packageEntries $pythonPackage \ $prefix/lib/python* \ $binDir done }