0
0
Fork 0
haikuports/dev-python/iniconfig/iniconfig-1.1.1.recipe

75 lines
1.9 KiB
Bash

SUMMARY="Brain-dead simple parsing of ini files"
DESCRIPTION="iniconfig is a small and simple INI-file parser module
having a unique set of features:
* tested against Python2.4 across to Python3.2, Jython, PyPy
* maintains order of sections and entries
* supports multi-line values with or without line-continuations
* supports "#" comments everywhere
* raises errors with proper line-numbers
* no bells and whistles like automatic substitutions
* iniconfig raises an Error if two sections have the same name."
HOMEPAGE="https://pypi.org/project/iniconfig/
http://github.com/RonnyPfannschmidt/iniconfig/"
COPYRIGHT="2010-2020 Holger Krekel and Ronny Pfannschmidt"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://github.com/RonnyPfannschmidt/iniconfig/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="a4489e91242e035cb58700d9a3c4bf49e0b106a85fefefe48025e333ea5ee49c"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3 python38 python39)
PYTHON_VERSIONS=(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_scm_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:git
cmd:python$pythonVersion
"
done
SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
export SETUPTOOLS_SCM_PRETEND_VERSION
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
}