diff --git a/airflowctl/utils/install_airflow.py b/airflowctl/utils/install_airflow.py index 648e176..ee2d546 100644 --- a/airflowctl/utils/install_airflow.py +++ b/airflowctl/utils/install_airflow.py @@ -104,7 +104,7 @@ def install_airflow( f"constraints-{version}/constraints-{_get_major_minor_version(python_version)}.txt" ) - if constraints_url: + if constraints_url and not os.getenv("AIRFLOWCTL_SKIP_CONSTRAINTS"): install_command += f" --constraint {constraints_url} " try: diff --git a/airflowctl/utils/project.py b/airflowctl/utils/project.py index 0b71145..9e56b95 100644 --- a/airflowctl/utils/project.py +++ b/airflowctl/utils/project.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import shutil import sys from pathlib import Path @@ -42,11 +43,12 @@ def create_project( GLOBAL_CONFIG_DIR.mkdir(exist_ok=True) GLOBAL_TRACKING_FILE.touch(exist_ok=True) - available_airflow_vers = get_airflow_versions() - if airflow_version not in available_airflow_vers and not Path(airflow_version).exists(): - print(f"Apache Airflow version [bold red]{airflow_version}[/bold red] not found.") - print(f"Please select a valid version from the list below: {available_airflow_vers}") - raise typer.Exit(code=1) + if not os.getenv("AIRFLOWCTL_SKIP_VERSION_CHECK"): + available_airflow_vers = get_airflow_versions() + if airflow_version not in available_airflow_vers and not Path(airflow_version).exists(): + print(f"Apache Airflow version [bold red]{airflow_version}[/bold red] not found.") + print(f"Please select a valid version from the list below: {available_airflow_vers}") + raise typer.Exit(code=1) # Create the project directory project_dir = Path(project_path).absolute() diff --git a/pyproject.toml b/pyproject.toml index e904e38..e214f38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "airflowctl" -version = "0.2.9" +version = "0.2.10dev1" description = "A CLI tool to streamline getting started with Apache Airflowâ„¢ and managing multiple Airflow projects." authors = [ "Kaxil Naik ",