Improve log when distutils is missing (#10713)
See https://github.com/astral-sh/uv/issues/4204 for motivation This doesn't really reach the user experience I'd expect — i.e., we end up saying a virtual environment "does not exist" which is a little silly. However, I think improving the error messaging on interpreter queries in general should be solved separately. I did one small "general" change in https://github.com/astral-sh/uv/pull/10713/commits/89e11d022222a999a4ba8eb73397ea314a636811 — otherwise we don't show the message at all. --------- Co-authored-by: konsti <konstin@mailbox.org>
This commit is contained in:
@@ -680,13 +680,56 @@ jobs:
|
||||
echo "$CONDA_PREFIX"
|
||||
./uv pip install anyio
|
||||
|
||||
integration-test-deadsnakes-39-linux:
|
||||
timeout-minutes: 5
|
||||
needs: build-binary-linux
|
||||
name: "integration test | deadsnakes python3.9 on ubuntu"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Install python3.9"
|
||||
run: |
|
||||
sudo add-apt-repository ppa:deadsnakes
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3.9
|
||||
|
||||
- name: "Download binary"
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: uv-linux-${{ github.sha }}
|
||||
|
||||
- name: "Prepare binary"
|
||||
run: chmod +x ./uv
|
||||
|
||||
- name: "Create a virtual environment"
|
||||
run: |
|
||||
./uv venv -p 3.9 --python-preference only-system
|
||||
|
||||
- name: "Check version"
|
||||
run: |
|
||||
.venv/bin/python --version
|
||||
|
||||
- name: "Check install missing distutils"
|
||||
run: |
|
||||
./uv pip install -v anyio 2>&1 | tee log.txt || true
|
||||
# We should report that distutils is missing
|
||||
grep 'Python installation is missing `distutils`' log.txt
|
||||
|
||||
- name: "Install distutils"
|
||||
run: |
|
||||
sudo apt-get install python3.9-distutils
|
||||
|
||||
- name: "Check install"
|
||||
run: |
|
||||
./uv pip install -v anyio
|
||||
# Now the install should succeed
|
||||
|
||||
integration-test-free-threaded-linux:
|
||||
timeout-minutes: 5
|
||||
needs: build-binary-linux
|
||||
name: "integration test | free-threaded on linux"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "install python3.13-nogil"
|
||||
- name: "Install python3.13-nogil"
|
||||
run: |
|
||||
sudo add-apt-repository ppa:deadsnakes
|
||||
sudo apt-get update
|
||||
|
||||
Reference in New Issue
Block a user