From 33c7491d2ce56a74ffafc3b6a433361402033989 Mon Sep 17 00:00:00 2001 From: Pankaj Date: Thu, 18 Jul 2024 19:04:26 +0530 Subject: [PATCH] Fix --- scripts/test/pre-install-airflow.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/test/pre-install-airflow.sh diff --git a/scripts/test/pre-install-airflow.sh b/scripts/test/pre-install-airflow.sh new file mode 100644 index 0000000..de29703 --- /dev/null +++ b/scripts/test/pre-install-airflow.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +AIRFLOW_VERSION="$1" +PYTHON_VERSION="$2" + +CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-$AIRFLOW_VERSION.0/constraints-$PYTHON_VERSION.txt" +curl -sSL $CONSTRAINT_URL -o /tmp/constraint.txt +# Workaround to remove PyYAML constraint that will work on both Linux and MacOS +sed '/PyYAML==/d' /tmp/constraint.txt > /tmp/constraint.txt.tmp +mv /tmp/constraint.txt.tmp /tmp/constraint.txt +# Install Airflow with constraints +pip install apache-airflow==$AIRFLOW_VERSION --constraint /tmp/constraint.txt +pip install pydantic --constraint /tmp/constraint.txt +rm /tmp/constraint.txt