treewide: handle preDistPhases __structuredAttrs-agnostically

Always specify the preDistPhases attribute as a list instead of a string.

Append elements to the preDistPhases Bash variable using appendToVar
instead of string or Bash array concatenation.

Handle element insertion before a specific element using string
substitution as before, but handle both structured and unstructured
attributes.
This commit is contained in:
Yueh-Shun Li
2024-09-03 05:33:59 +08:00
parent 385d523a8e
commit 054c5f0e10
17 changed files with 40 additions and 26 deletions
@@ -58,5 +58,5 @@ function pytestCheckPhase() {
if [ -z "${dontUsePytestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
echo "Using pytestCheckPhase"
preDistPhases+=" pytestCheckPhase"
appendToVar preDistPhases pytestCheckPhase
fi
@@ -6,5 +6,5 @@ pythonCatchConflictsPhase() {
}
if [ -z "${dontUsePythonCatchConflicts-}" ]; then
preDistPhases+=" pythonCatchConflictsPhase"
appendToVar preDistPhases pythonCatchConflictsPhase
fi
@@ -18,5 +18,5 @@ pythonImportsCheckPhase () {
if [ -z "${dontUsePythonImportsCheck-}" ]; then
echo "Using pythonImportsCheckPhase"
preDistPhases+=" pythonImportsCheckPhase"
appendToVar preDistPhases pythonImportsCheckPhase
fi
@@ -13,5 +13,5 @@ pythonRemoveBinBytecodePhase () {
}
if [ -z "${dontUsePythonRemoveBinBytecode-}" ]; then
preDistPhases+=" pythonRemoveBinBytecodePhase"
appendToVar preDistPhases pythonRemoveBinBytecodePhase
fi
@@ -69,4 +69,4 @@ installSphinxPhase() {
runHook postInstallSphinx
}
preDistPhases+=" buildSphinxPhase installSphinxPhase"
appendToVar preDistPhases buildSphinxPhase installSphinxPhase
@@ -13,5 +13,5 @@ unittestCheckPhase() {
if [ -z "${dontUseUnittestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
echo "Using unittestCheckPhase"
preDistPhases+=" unittestCheckPhase"
appendToVar preDistPhases unittestCheckPhase
fi