pytest, bump version, add dependencies (#8774)

This commit is contained in:
Schrijvers Luc
2023-06-02 12:47:49 +02:00
committed by GitHub
parent f0ed5c52c9
commit aa861754c8
4 changed files with 245 additions and 77 deletions

View File

@@ -0,0 +1,67 @@
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
}