From 430326f80fbb3137205f25abf6ca324eb5bc6707 Mon Sep 17 00:00:00 2001 From: OscarL Date: Mon, 22 Jul 2024 13:04:26 -0300 Subject: [PATCH] installer: don't use 'build' to avoid circular dependencies. (#10729) Helps with #10717. --- dev-python/installer/installer-0.7.0.recipe | 28 +++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/dev-python/installer/installer-0.7.0.recipe b/dev-python/installer/installer-0.7.0.recipe index d3a79167c..a976cbaf5 100644 --- a/dev-python/installer/installer-0.7.0.recipe +++ b/dev-python/installer/installer-0.7.0.recipe @@ -10,7 +10,7 @@ wheels. HOMEPAGE="https://pypi.org/project/installer/" COPYRIGHT="2020 Pradyun Gedam" LICENSE="MIT" -REVISION="4" +REVISION="5" SOURCE_URI="https://pypi.io/packages/source/i/installer/installer-$portVersion.tar.gz" CHECKSUM_SHA256="a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631" @@ -27,11 +27,11 @@ BUILD_REQUIRES=" haiku_devel " -PYTHON_PACKAGES=(python39 python310) PYTHON_VERSIONS=(3.9 3.10) -for i in "${!PYTHON_PACKAGES[@]}"; do - pythonPackage=${PYTHON_PACKAGES[i]} + +for i in "${!PYTHON_VERSIONS[@]}"; do pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} eval "PROVIDES_${pythonPackage}=\" ${portName}_$pythonPackage = $portVersion @@ -40,8 +40,8 @@ for i in "${!PYTHON_PACKAGES[@]}"; do haiku cmd:python$pythonVersion \"" + BUILD_REQUIRES+=" - build_$pythonPackage flit_core_$pythonPackage " BUILD_PREREQUIRES+=" @@ -51,13 +51,21 @@ done INSTALL() { - for i in "${!PYTHON_PACKAGES[@]}"; do - python=python${PYTHON_VERSIONS[$i]} + for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} - $python -m build -wn --skip-dependency-check + python=python$pythonVersion + installdir=$prefix/lib/$python/vendor-packages + + rm -rf dist + + # We don't use "build" here, to avoid circular depedencies later on. + + $python -m flit_core.wheel PYTHONPATH=src $python -m installer --prefix=$prefix dist/*.whl - packageEntries ${PYTHON_PACKAGES[i]} \ - $prefix/lib/python* + packageEntries $pythonPackage \ + $prefix/lib/$python done }