Files
haikuports/dev-python/paramiko/paramiko-2.6.0.recipe
2019-10-25 21:24:09 +02:00

81 lines
1.8 KiB
Bash

SUMMARY="Pure python SSH implementation"
DESCRIPTION="Paramiko is a module for python 2.2 (or higher) that implements \
the SSH2 protocol for secure (encrypted and authenticated) connections to \
remote machines."
HOMEPAGE="https://www.lag.net/paramiko/"
COPYRIGHT="2003-2009 Robey Pointer"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/p/paramiko/paramiko-$portVersion.tar.gz"
CHECKSUM_SHA256="f4b2edfa0d226b70bd4ca31ea7e389325990283da23465d572ed1f70a7583041"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
TEST_REQUIRES="
pytest
"
PYTHON_PACKAGES=(python python3)
PYTHON_VERSIONS=(2.7 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\
bcrypt_$pythonPackage >= 3.1.3\n\
cryptography_$pythonPackage\n\
pynacl_$pythonPackage >= 1.0.1\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
TEST_REQUIRES="$TEST_REQUIRES
pytest_$pythonPackage
"
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
}
TEST()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
pytest
done
}