Skip to content

Commit 30f09df

Browse files
MINOR: pin setuptools<81 (#25763)
* pin setuptools<81 * env setup fix
1 parent 645b922 commit 30f09df

File tree

6 files changed

+28
-7
lines changed

6 files changed

+28
-7
lines changed

ingestion/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ ENV PIP_NO_CACHE_DIR=1
8181
# Make pip silent
8282
ENV PIP_QUIET=1
8383
ARG RI_VERSION="1.12.0.0.dev0"
84-
RUN pip install --upgrade pip
84+
# Pin setuptools<81 as pkg_resources was removed in setuptools 81.0.0+
85+
# cx-Oracle's setup.py still uses pkg_resources
86+
RUN pip install --upgrade pip "setuptools<81"
87+
# Pre-install cx-Oracle without build isolation to use the pinned setuptools
88+
RUN pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
8589
RUN pip install "openmetadata-managed-apis~=${RI_VERSION}" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-3.1.5/constraints-3.10.txt"
8690
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
8791

ingestion/Dockerfile.ci

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ ENV PIP_NO_CACHE_DIR=1
8585
# Make pip silent
8686
ENV PIP_QUIET=1
8787

88-
RUN pip install --upgrade pip
88+
# Pin setuptools<81 as pkg_resources was removed in setuptools 81.0.0+
89+
# cx-Oracle's setup.py still uses pkg_resources
90+
RUN pip install --upgrade pip "setuptools<81"
91+
92+
# Pre-install cx-Oracle without build isolation to use the pinned setuptools
93+
RUN pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
8994

9095
# Install FAB provider for Airflow 3.x Flask Blueprint compatibility
9196
RUN pip install "apache-airflow-providers-fab>=1.0.0" --constraint "/home/airflow/airflow-constraints-3.1.5.txt" || true

ingestion/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ install: ## Install the ingestion module to the current environment
1515

1616
.PHONY: install_dev_env
1717
install_dev_env: ## Install all dependencies for development (in edit mode)
18-
pip install --upgrade pip
18+
pip install --upgrade pip "setuptools<81"
1919
pip install nox
20+
pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
2021
python -m pip install -e "$(INGESTION_DIR)[all-dev-env, dev, test-unit]"
2122

2223
.PHONY: install_dev
@@ -25,10 +26,14 @@ install_dev: ## Install the ingestion module with dev dependencies
2526

2627
.PHONY: install_test
2728
install_test: ## Install the ingestion module with test dependencies
29+
python -m pip install --upgrade pip "setuptools<81"
30+
python -m pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
2831
python -m pip install "$(INGESTION_DIR)[test]/"
2932

3033
.PHONY: install_all
3134
install_all: ## Install the ingestion module with all dependencies
35+
python -m pip install --upgrade pip "setuptools<81"
36+
python -m pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
3237
python -m pip install "$(INGESTION_DIR)[all]/"
3338

3439
.PHONY: install_apis

ingestion/operators/docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ ENV PIP_NO_CACHE_DIR=1
8181
# Make pip silent
8282
ENV PIP_QUIET=1
8383

84-
RUN pip install --upgrade pip
84+
# Pin setuptools<81 as pkg_resources was removed in setuptools 81.0.0+
85+
# cx-Oracle's setup.py still uses pkg_resources
86+
RUN pip install --upgrade pip "setuptools<81"
87+
# Pre-install cx-Oracle without build isolation to use the pinned setuptools
88+
RUN pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
8589

8690
ARG INGESTION_DEPENDENCY="all"
8791
ARG RI_VERSION="1.12.0.0.dev0"
88-
RUN pip install --upgrade pip
8992
RUN pip install "openmetadata-ingestion[airflow]~=${RI_VERSION}"
9093
RUN pip install "openmetadata-ingestion[${INGESTION_DEPENDENCY}]~=${RI_VERSION}"
9194

ingestion/operators/docker/Dockerfile.ci

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ ENV PIP_NO_CACHE_DIR=1
8181
# Make pip silent
8282
ENV PIP_QUIET=1
8383

84-
RUN pip install --upgrade pip setuptools~=70.3.0
84+
# Pin setuptools<81 as pkg_resources was removed in setuptools 81.0.0+
85+
# cx-Oracle's setup.py still uses pkg_resources
86+
RUN pip install --upgrade pip "setuptools<81"
87+
# Pre-install cx-Oracle without build isolation to use the pinned setuptools
88+
RUN pip install --no-build-isolation "cx_Oracle>=8.3.0,<9"
8589

8690
ARG INGESTION_DEPENDENCY="all"
8791
RUN pip install ".[airflow]"

ingestion/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
"tabulate==0.9.0",
170170
"typing-inspect",
171171
"packaging", # For version parsing
172-
"setuptools~=78.1.1",
172+
"setuptools>=78.1.1,<81", # <81 required: pkg_resources removed in setuptools 81+
173173
"shapely",
174174
"collate-data-diff>=0.11.9",
175175
"jaraco.functools<4.2.0", # above 4.2 breaks the build

0 commit comments

Comments
 (0)