This is an automated email from the ASF dual-hosted git repository.
raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new aeff591588 GH-50760: [CI][Python] Create venv for
test-fedora-42-python-3 (#50761)
aeff591588 is described below
commit aeff591588d7bcdf9ab9fc6712816b44e8066ea4
Author: tadeja <[email protected]>
AuthorDate: Mon Aug 3 11:29:10 2026 +0200
GH-50760: [CI][Python] Create venv for test-fedora-42-python-3 (#50761)
### Rationale for this change
The nightly job `test-fedora-42-python-3` fails with `Cannot uninstall
packaging 24.2`
`╰─> The package's contents are unknown: no RECORD file was found for
packaging.`
### What changes are included in this PR?
venv in `linux-dnf-python-3.dockerfile` to install Python requirements there
### Are these changes tested?
Yes, crossbow job passes.
### Are there any user-facing changes?
No.
* GitHub Issue: #50760
Authored-by: Tadeja Kadunc <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
---
ci/docker/linux-dnf-python-3.dockerfile | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/ci/docker/linux-dnf-python-3.dockerfile
b/ci/docker/linux-dnf-python-3.dockerfile
index 6c89ebf5eb..0881d7789e 100644
--- a/ci/docker/linux-dnf-python-3.dockerfile
+++ b/ci/docker/linux-dnf-python-3.dockerfile
@@ -24,18 +24,20 @@ RUN dnf install -y \
python3-pip \
python3-devel
-RUN ln -s /usr/bin/python3 /usr/local/bin/python && \
- ln -s /usr/bin/pip3 /usr/local/bin/pip
-
-RUN pip install -U pip setuptools wheel
-
COPY python/requirements-build.txt \
python/requirements-test.txt \
/arrow/python/
-RUN pip install \
- -r arrow/python/requirements-build.txt \
- -r arrow/python/requirements-test.txt
+# venv instead of system Python, otherwise pip can't upgrade
+# packages installed by RPM (error: uninstall-no-record-file)
+ENV ARROW_PYTHON_VENV /arrow-dev
+
+RUN python3 -m venv ${ARROW_PYTHON_VENV} && \
+ . ${ARROW_PYTHON_VENV}/bin/activate && \
+ pip install -U pip setuptools wheel && \
+ pip install \
+ -r arrow/python/requirements-build.txt \
+ -r arrow/python/requirements-test.txt
ENV ARROW_ACERO=ON \
ARROW_BUILD_STATIC=OFF \