mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
67 lines
1.6 KiB
Bash
67 lines
1.6 KiB
Bash
SUMMARY="PEP 518 build backend combining flit with setuptools_scm"
|
|
DESCRIPTION="A PEP 518 build backend that uses setuptools_scm to generate a version file from \
|
|
your version control system, then flit_core to build the package."
|
|
HOMEPAGE="https://gitlab.com/WillDaSilva/flit_scm"
|
|
COPYRIGHT="2021 Will Da Silva"
|
|
LICENSE="MIT"
|
|
REVISION="2"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="961bd6fb24f31bba75333c234145fff88e6de0a90fc0f7e5e7c79deca69f6bb2"
|
|
|
|
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
|
|
flit_core_$pythonPackage
|
|
setuptools_scm_$pythonPackage
|
|
tomli_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
\""
|
|
BUILD_REQUIRES+="
|
|
flit_core_$pythonPackage
|
|
setuptools_scm_$pythonPackage
|
|
tomli_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
|
|
|
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|