[Python] How to set up shiv to properly use an existent .venv site-packages and not redownload...

Discussão em 'Python' iniciado por Stack, Julho 1, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to use shiv with a project that contains a pyproject.toml in my CI.

    This project is being built, in a previous step, by PDM with SetupTools as build-backend, and all dependencies are already in the .venv created by it.

    I just want shiv to pack it.

    But when it executes

    pdm run shiv --compressed -e myproject.cli:cli -o myproject.pyz
    -p '/usr/bin/env python3.12' --no-build-isolation
    --site-packages .venv/lib/python3.12/site-packages


    Then shiv starts to download everything again and for some deps, to build it.

    Collecting python-dotenv>=0.21.0 (from pydantic-settings->myproject==4.1.0rc1)

    Downloading https://artifactory/api/pypi/python/packages/packages/5f/ed/539768cf28c661b5b068d66d96a2f155c4971a5d55684a514c1a0e0dec2f/python_dotenv-1.1.1-py3-none-any.whl (20 kB)

    Building wheels for collected packages: airspeed
    ...

    Continue reading...

Compartilhe esta Página