mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
64 lines
1.7 KiB
Bash
64 lines
1.7 KiB
Bash
SUMMARY="A simple packaging tool for simple packages"
|
|
DESCRIPTION="**Flit** is a simple way to put Python packages and modules on PyPI.
|
|
It tries to require less thought about packaging and help you avoid common
|
|
mistakes."
|
|
HOMEPAGE="https://pypi.org/project/flit/"
|
|
COPYRIGHT="2015 Thomas Kluyver and contributors"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="3"
|
|
pypiVersion="f8/81/5281e3f50a238d1169cc5c4c3acec91c631da79962d387ea843083bd151e"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/flit-$portVersion-py3-none-any.whl#noarchive"
|
|
CHECKSUM_SHA256="06a93a6737fa9380ba85fe8d7f28efb6c93c4f4ee9c7d00cc3375a81f33b91a4"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python38 python39 python310)
|
|
PYTHON_VERSIONS=(3.8 3.9 3.10)
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
eval "PROVIDES_${pythonPackage}=\"\
|
|
${portName}_$pythonPackage = $portVersion\n\
|
|
cmd:flit\
|
|
\"; \
|
|
REQUIRES_$pythonPackage=\"\
|
|
haiku\n\
|
|
cmd:python$pythonVersion\
|
|
\""
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
setuptools_$pythonPackage"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
installer_$pythonPackage
|
|
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 -m installer -p $prefix flit-$portVersion-py3-none-any.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python* \
|
|
$prefix/bin
|
|
done
|
|
}
|