mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
72 lines
1.8 KiB
Bash
72 lines
1.8 KiB
Bash
SUMMARY="A library to access the metadata for a Python package"
|
|
DESCRIPTION="This project primarily supports third-party packages installed \
|
|
by PyPA tools (or other conforming packages). It does not support:
|
|
- Packages in the stdlib.
|
|
- Packages installed without metadata."
|
|
HOMEPAGE="https://pypi.python.org/pypi/importlib-metadata"
|
|
COPYRIGHT="2017-2023 Jason R. Coombs, Barry Warsaw"
|
|
LICENSE="Apache v2"
|
|
REVISION="3"
|
|
SOURCE_URI="https://pypi.python.org/packages/source/i/$portName/$portName-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.10)
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_$pythonPackage=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
zipp_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
setuptools_scm_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
# Needed due to the presence of HaikuPorter's work .git dir:
|
|
# setuptools_scm assumes that .git is from the project, and fails to get the info it needs
|
|
# generating wrong default value in that case.
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python${PYTHON_VERSIONS[$i]}
|
|
|
|
rm -rf dist
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|