mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
65 lines
1.6 KiB
Bash
65 lines
1.6 KiB
Bash
SUMMARY="Expand system variables, Unix style"
|
|
DESCRIPTION="This module is inspired by GNU bash's variable expansion features.
|
|
It can be used as an alternative to Python's os.path.expandvars function.
|
|
|
|
A good use case is reading config files with the flexibility of reading values from \
|
|
environment variables using advanced features like returning a default value if some \
|
|
variable is not defined."
|
|
HOMEPAGE="https://github.com/sayanarijit/expandvars"
|
|
COPYRIGHT="2019 Arijit Basu"
|
|
LICENSE="MIT"
|
|
REVISION="1"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/py3/${portName:0:1}/$portName/$portName-$portVersion-py3-none-any.whl#noarchive"
|
|
CHECKSUM_SHA256="7432c1c2ae50c671a8146583177d60020dd210ada7d940e52af91f1f84f753b2"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
# Add more versions here as necessary:
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
$REQUIRES
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
installer_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
$python -m installer -p $prefix $portName-$portVersion-py3-none-any.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|