mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 23:30:04 +02:00
flit_core: update to version 3.9.0. Bootstrap the package creation. (#10728)
Using boostrapping here will help solve some circular dependencies on packages like "build" (see issue #10717).
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
SUMMARY="Simplified packaging of Python modules (core module)"
|
||||
DESCRIPTION="This provides a PEP 517 build backend for packages using Flit.
|
||||
The only public interface is the API specified by PEP 517, at ``flit_core.buildapi``."
|
||||
HOMEPAGE="https://pypi.org/project/flit_core/"
|
||||
COPYRIGHT="2015 Thomas Kluyver and contributors"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/f/flit-core/flit_core-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="b305b30c99526df5e63d6022dd2310a0a941a187bd3884f4c8ef0418df6c39f3"
|
||||
|
||||
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\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
python=python${PYTHON_VERSIONS[$i]}
|
||||
$python -m build --wheel --no-isolation --skip-dependency-check
|
||||
$python -m installer --prefix=$prefix dist/*.whl
|
||||
|
||||
packageEntries ${PYTHON_PACKAGES[i]} \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
64
dev-python/flit-core/flit_core-3.9.0.recipe
Normal file
64
dev-python/flit-core/flit_core-3.9.0.recipe
Normal file
@@ -0,0 +1,64 @@
|
||||
SUMMARY="Simplified packaging of Python modules (core module)"
|
||||
DESCRIPTION="This provides a PEP 517 build backend for packages using Flit.
|
||||
The only public interface is the API specified by PEP 517, at ``flit_core.buildapi``."
|
||||
HOMEPAGE="https://pypi.org/project/flit_core/"
|
||||
COPYRIGHT="2015 Thomas Kluyver and contributors"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/f/flit-core/flit_core-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="72ad266176c4a3fcfab5f2930d76896059851240570ce9a98733b658cb786eba"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
for i in "${!PYTHON_VERSIONS[@]}"; do
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
pythonPackage=python${pythonVersion//.}
|
||||
|
||||
python=python$pythonVersion
|
||||
installdir=$prefix/lib/$python/vendor-packages
|
||||
|
||||
rm -rf dist
|
||||
|
||||
# We need to bootstrap here, to avoid circular depedencies on "build"/"installer", etc.
|
||||
|
||||
$python -m flit_core.wheel
|
||||
$python bootstrap_install.py --installdir=$installdir dist/flit_core-*.whl
|
||||
|
||||
$python -m compileall $jobArgs -o 0 -o 1 $installdir
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/$python
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user