iniconfig, new python module (#5356)

This commit is contained in:
Schrijvers Luc
2020-10-25 16:46:45 +01:00
committed by GitHub
parent e5d66fc4cc
commit ec5c8692fe

View File

@@ -0,0 +1,74 @@
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="1"
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=(python36 python3)
PYTHON_VERSIONS=(3.6 3.7)
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
}