@@ -412,11 +412,14 @@ function common::get_packaging_tool() {
412
412
echo
413
413
export PACKAGING_TOOL="uv"
414
414
export PACKAGING_TOOL_CMD="uv pip"
415
- if [[ ${AIRFLOW_INSTALLATION_METHOD=} == "." && -f "./pyproject.toml" ]]; then
415
+ # --no-binary is needed in order to avoid libxml and xmlsec using different version of libxml2
416
+ # (binary lxml embeds its own libxml2, while xmlsec uses system one).
417
+ # See https://bugs.launchpad.net/lxml/+bug/2110068
418
+ if [[ ${AIRFLOW_INSTALLATION_METHOD=} == "." && -f "./pyproject.toml" ]]; then
416
419
# for uv only install dev group when we install from sources
417
- export EXTRA_INSTALL_FLAGS="--group=dev"
420
+ export EXTRA_INSTALL_FLAGS="--group=dev --no-binary lxml --no-binary xmlsec "
418
421
else
419
- export EXTRA_INSTALL_FLAGS=""
422
+ export EXTRA_INSTALL_FLAGS="--no-binary lxml --no-binary xmlsec "
420
423
fi
421
424
export EXTRA_UNINSTALL_FLAGS=""
422
425
export UPGRADE_TO_HIGHEST_RESOLUTION="--upgrade --resolution highest"
@@ -628,8 +631,12 @@ function install_from_sources() {
628
631
echo
629
632
echo "${COLOR_BLUE}Attempting to upgrade all packages to highest versions.${COLOR_RESET}"
630
633
echo
634
+ # --no-binary is needed in order to avoid libxml and xmlsec using different version of libxml2
635
+ # (binary lxml embeds its own libxml2, while xmlsec uses system one).
636
+ # See https://bugs.launchpad.net/lxml/+bug/2110068
631
637
set -x
632
- uv sync --all-packages --resolution highest --group dev --group docs --group docs-gen --group leveldb ${extra_sync_flags}
638
+ uv sync --all-packages --resolution highest --group dev --group docs --group docs-gen \
639
+ --group leveldb ${extra_sync_flags} --no-binary-package lxml --no-binary-package xmlsec
633
640
else
634
641
# We only use uv here but Installing using constraints is not supported with `uv sync`, so we
635
642
# do not use ``uv sync`` because we are not committing and using uv.lock yet.
@@ -686,8 +693,12 @@ function install_from_sources() {
686
693
echo
687
694
echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
688
695
echo
696
+ # --no-binary is needed in order to avoid libxml and xmlsec using different version of libxml2
697
+ # (binary lxml embeds its own libxml2, while xmlsec uses system one).
698
+ # See https://bugs.launchpad.net/lxml/+bug/2110068
689
699
set -x
690
- uv sync --all-packages --group dev --group docs --group docs-gen --group leveldb ${extra_sync_flags}
700
+ uv sync --all-packages --group dev --group docs --group docs-gen \
701
+ --group leveldb ${extra_sync_flags} --no-binary-package lxml --no-binary-packag xmlsec
691
702
set +x
692
703
fi
693
704
fi
@@ -1125,13 +1136,19 @@ function check_force_lowest_dependencies() {
1125
1136
exit 0
1126
1137
fi
1127
1138
cd "${AIRFLOW_SOURCES}/providers/${provider_id/.//}" || exit 1
1128
- uv sync --resolution lowest-direct
1139
+ # --no-binary is needed in order to avoid libxml and xmlsec using different version of libxml2
1140
+ # (binary lxml embeds its own libxml2, while xmlsec uses system one).
1141
+ # See https://bugs.launchpad.net/lxml/+bug/2110068
1142
+ uv sync --resolution lowest-direct --no-binary-package lxml --no-binary-package xmlsec
1129
1143
else
1130
1144
echo
1131
1145
echo "${COLOR_BLUE}Forcing dependencies to lowest versions for Airflow.${COLOR_RESET}"
1132
1146
echo
1133
1147
cd "${AIRFLOW_SOURCES}/airflow-core"
1134
- uv sync --resolution lowest-direct
1148
+ # --no-binary is needed in order to avoid libxml and xmlsec using different version of libxml2
1149
+ # (binary lxml embeds its own libxml2, while xmlsec uses system one).
1150
+ # See https://bugs.launchpad.net/lxml/+bug/2110068
1151
+ uv sync --resolution lowest-direct --no-binary-package lxml --no-binary-package xmlsec
1135
1152
fi
1136
1153
}
1137
1154
0 commit comments