mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
flit, new python recipe (#7025)
This commit is contained in:
66
dev-python/flit/flit-3.7.1.recipe
Normal file
66
dev-python/flit/flit-3.7.1.recipe
Normal file
@@ -0,0 +1,66 @@
|
||||
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="1"
|
||||
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=(python3 python38 python39 python310)
|
||||
PYTHON_VERSIONS=(3.7 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
|
||||
|
||||
mv $installLocation/../site-packages/* $installLocation
|
||||
rm -rf $installLocation/../site-packages
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$prefix/bin
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user