mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
dev-python/click: new recipe.
This commit is contained in:
86
dev-python/click/click-7.0.recipe
Normal file
86
dev-python/click/click-7.0.recipe
Normal file
@@ -0,0 +1,86 @@
|
||||
SUMMARY="A Python package for creating beautiful command line interfaces"
|
||||
DESCRIPTION="The \“Command Line Interface Creation Kit\”, or \"click\", aims \
|
||||
to make the process of writing command line tools quick and fun."
|
||||
HOMEPAGE="https://click.palletsprojects.com/
|
||||
https://pypi.org/project/click/
|
||||
https://github.com/pallets/click"
|
||||
COPYRIGHT="2014-2018 Pallets Team
|
||||
2001-2006 Gregory P. Ward
|
||||
2002-2006 Python Software Foundation"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/C/Click/Click-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"
|
||||
SOURCE_DIR="Click-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
click = $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
|
||||
|
||||
BUILD()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
rm -rf "$sourceDir"-$pythonPackage
|
||||
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
$python setup.py build
|
||||
done
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
cd "$sourceDir"-$pythonPackage
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation
|
||||
mkdir -p "$installLocation"
|
||||
$python setup.py install \
|
||||
--root=/ --prefix="$prefix"
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python
|
||||
done
|
||||
|
||||
install -m 755 -d "$docDir"
|
||||
install -m 644 -t "$docDir" README.rst
|
||||
}
|
||||
Reference in New Issue
Block a user