Regex: bump, enable for python2 (#4650)

This commit is contained in:
miqlas
2020-02-02 19:50:28 +01:00
committed by GitHub
parent 031dbd2644
commit 0d03248258

View File

@@ -0,0 +1,64 @@
SUMMARY="All things regular expression: implemented in python"
DESCRIPTION="This regex implementation is backwards-compatible with the \
standard re module, but offers additional functionality."
HOMEPAGE="https://pypi.org/project/regex/"
COPYRIGHT="2013-2020 Matthew Barnett"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://pypi.org/packages/source/r/regex/regex-$portVersion.tar.gz"
CHECKSUM_SHA256="d0f424328f9822b0323b3b6f2e4b9c90960b24743d220763c7f07071e0778351"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_PACKAGES=(python python36 python3)
PYTHON_VERSIONS=(2.7 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$secondaryArchSuffix\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
}