[Python] Transitive file dependencies break pipenv / Pipfile.lock

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

  1. Stack

    Stack Membro Participativo

    To avoid running a private a pypi server, we store our wheels on a file server and reference them in Pipfiles using like foo = { file = "\\\\server\\foo-0.1.20-py3-none-any.whl" }

    This works, but we now want to create wheels that require other local packages. To this end we have a build script that creates an install_requires list for the setup.py, looking like this:

    install_requires=[
    ...
    'foo @ file://server/foo-0.1.20-py3-none-any.whl',
    ...]


    Installing the resulting wheel with pip works fine and installs the required dependencies as expected.

    However, trying to list a wheel that contains transitive dependencies in a Pipfile fails: When running pipenv lock, the resulting Pipfile.lock contains all transitive dependencies, but they are all empty:

    "foo": {},


    Subsequently, pipenv install fails:

    ERROR: Could not find a version that satisfies the requirement foo (from versions: none)
    ERROR: No matching distribution found for foo
    ERROR: Couldn't install package: {}
    Package installation failed...


    Am I doing something wrong? Is there any way to get this to work?

    Continue reading...

Compartilhe esta Página