PyAES: new recipe (#4257)

tested on all 3 platforms
This commit is contained in:
miqlas
2019-10-09 05:25:05 +02:00
committed by waddlesplash
parent d9b6414da4
commit 4782ded8c7

View File

@@ -0,0 +1,71 @@
SUMMARY="Python implementation of the AES block cipher algorithm"
DESCRIPTION="A pure-Python implementation of the AES block cipher algorithm \
and the common modes of operation (CBC, CFB, CTR, ECB and OFB)."
HOMEPAGE="https://pypi.python.org/pypi/pip"
COPYRIGHT="2014 Richard Moore"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/ricmoo/pyaes/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="69fb7517bcb8d834d521e31bca671456bd6de87cdf2c338171a48dedebbcf42e"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
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\n\
cmd:pip$pythonVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
setuptools_$pythonPackage\n\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
PROVIDES_python="$PROVIDES_python
cmd:pip
"
REPLACES_python="
python_pip
"
REPLACES_python3="
python3_pip
"
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
}