mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-12 06:40:08 +02:00
68 lines
1.6 KiB
Bash
68 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="1"
|
|
SOURCE_URI="$HOMEPAGE/-/archive/$portVersion/flit_scm-$portVersion.tar.bz2"
|
|
CHECKSUM_SHA256="bb49e2da0da8628ed7892283d773c7f2cac46a0ee034a8e08aa557b58b222baa"
|
|
|
|
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
|
|
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 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
|
|
}
|