Files
haikuports/app-shells/xonsh/xonsh-0.11.0.recipe
2023-07-01 21:54:14 -06:00

67 lines
1.7 KiB
Bash

SUMMARY="Python-powered, cross-platform, Unix-gazing shell"
DESCRIPTION="xonsh is a Python-powered, cross-platform, Unix-gazing shell \
language and command prompt. The language is a superset of Python 3.5+ with \
additional shell primitives. xonsh (pronounced conch) is meant for the daily \
use of experts and novices alike."
HOMEPAGE="https://xon.sh/"
COPYRIGHT="2015-2019 the xonsh developers"
LICENSE="BSD (2-clause)"
REVISION="2"
SOURCE_URI="https://github.com/xonsh/xonsh/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="9d73273276996297920c234c7d4267a305c695f0e9e2454dbdf0655c3a8f75cb"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python310)
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
cmd:xon.sh\n\
cmd:xonsh\n\
cmd:xonsh_cat\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
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* \
$binDir
done
}