mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
pyproject_metadata, new python recipe (#8849)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
SUMMARY="PEP 621 metadata parsing"
|
||||
DESCRIPTION="Dataclass for PEP 621 metadata with support for [core metadata] generation
|
||||
|
||||
This project does not implement the parsing of *pyproject.toml* containing PEP 621 metadata.
|
||||
|
||||
Instead, given a Python data structure representing PEP 621 metadata (already parsed), it will \
|
||||
validate this input and generate a PEP 643-compliant metadata file (e.g. *PKG-INFO*)."
|
||||
HOMEPAGE="https://github.com/FFY00/python-pyproject-metadata"
|
||||
COPYRIGHT="2019 Filipe Laíns"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/p/pyproject-metadata/pyproject-metadata-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67"
|
||||
SOURCE_DIR="pyproject-metadata-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
wheel_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
|
||||
$python -m build --wheel --skip-dependency-check --no-isolation
|
||||
$python -m installer -p $prefix dist/*.whl
|
||||
|
||||
packageEntries ${PYTHON_PACKAGES[i]} \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user