8000 Allow installing from Airflow pacakges in Private PyPI by kaxil · Pull Request #32 · kaxil/airflowctl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Allow installing from Airflow pacakges in Private PyPI #32

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflowctl/utils/install_airflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
12 changes: 7 additions & 5 deletions airflowctl/utils/project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import os
import shutil
import sys
from pathlib import Path
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <kaxilnaik@gmail.com>",
Expand Down
Loading
0