SUMMARY="A Python fork of SmartyPants" DESCRIPTION="Translate plain ASCII quotation marks and other characters into “smart” typographic HTML entities." HOMEPAGE="https://github.com/justinmayer/smartypants.py" COPYRIGHT="2025–present, Justin Mayer 2017, Leo Hemsted 2013, 2014, 2015, 2016 Yu-Jie Lin 2004, 2005, 2007, 2013 Chad Miller 2003 John Gruber " LICENSE=" BSD (3-clause) BSD (2-clause) " REVISION="1" SOURCE_URI="https://files.pythonhosted.org/packages/py2.py3/${portName:0:1}/$portName/$portName-$portVersion-py2.py3-none-any.whl#noarchive" CHECKSUM_SHA256="9471578606e8ee0740065bf8771f55fec8c83313cb98c5d1c1864ddd389d0f3a" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " # Add more versions here if necessary: PYTHON_VERSIONS=(3.10) defaultVersion=3.10 for pythonVersion in ${PYTHON_VERSIONS[@]}; do pythonPackage=python${pythonVersion//.} eval "PROVIDES_$pythonPackage=\" ${portName}_$pythonPackage = $portVersion cmd:smartypants_$pythonVersion = $portVersion \"" if [ $pythonVersion = $defaultVersion ]; then eval "PROVIDES_$pythonPackage+=\" cmd:smartypants = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" $REQUIRES cmd:python$pythonVersion \"" BUILD_REQUIRES+=" installer_$pythonPackage " BUILD_PREREQUIRES+=" cmd:python$pythonVersion " done INSTALL() { for pythonVersion in ${PYTHON_VERSIONS[@]}; do pythonPackage=python${pythonVersion//.} python=python$pythonVersion $python -m installer -p $prefix $portName-$portVersion-py2.py3-none-any.whl # 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 }