mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
flit-core, new python recipe (#7024)
This commit is contained in:
63
dev-python/flit-core/flit_core-3.7.1.recipe
Normal file
63
dev-python/flit-core/flit_core-3.7.1.recipe
Normal file
@@ -0,0 +1,63 @@
|
||||
SUMMARY="Simplified packaging of Python modules (core module)"
|
||||
DESCRIPTION="This provides a PEP 517 build backend for packages using Flit.
|
||||
The only public interface is the API specified by PEP 517, at ``flit_core.buildapi``."
|
||||
HOMEPAGE="https://pypi.org/project/flit_core/"
|
||||
COPYRIGHT="2015 Thomas Kluyver and contributors"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
pypiVersion="ad/38/80992c4cb490a05474c886850ec818276d09c0a6722bd5b43bc487818ac7"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/flit_core-$portVersion-py3-none-any.whl#noarchive"
|
||||
CHECKSUM_SHA256="e454fdbf68c7036e1c7435ec7479383f9d9a1650ca5b304feb184eba1efcdcef"
|
||||
|
||||
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\
|
||||
\"; \
|
||||
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_core-$portVersion-py3-none-any.whl
|
||||
|
||||
mv $installLocation/../site-packages/* $installLocation
|
||||
rm -rf $installLocation/../site-packages
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user