mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
idna: bump to 2.7, add TEST, install README.rst in $docDir.
This commit is contained in:
81
dev-python/idna/idna-2.7.recipe
Normal file
81
dev-python/idna/idna-2.7.recipe
Normal file
@@ -0,0 +1,81 @@
|
||||
SUMMARY="Internationalized Domain Names in Applications (IDNA)"
|
||||
DESCRIPTION="Support for the Internationalised Domain Names in Applications \
|
||||
(IDNA) protocol as specified in RFC 5891 <http://tools.ietf.org/html/rfc5891>."
|
||||
HOMEPAGE="https://pypi.python.org/pypi/idna"
|
||||
COPYRIGHT="2013-2018 Kim Davie"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/i/idna/idna-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
idna = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
setuptools_python
|
||||
setuptools_python3
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:python
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
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
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses
|
||||
install -m 644 -T LICENSE.rst "$dataDir"/licenses/idna.rst
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$dataDir" \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
install -m 755 -d "$dataDir"/licenses "$docDir"
|
||||
install -m 644 -T LICENSE.rst "$dataDir"/licenses/idna.rst
|
||||
install -m 644 -t "$docDir" README.rst
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py test
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user