Skip to content

Feature: have 'uv export' support --only-deps #6960

@RomainBrault

Description

@RomainBrault

Have uv export support --only-deps

This would be useful to support building requirements.txt from uv.lock without including build dependencies.

Example: in a Dockerfile with a custom hatch build the following fails:

COPY pyproject.toml ./
RUN set -ex && \
    ${UV_BIN}/uv export \
        --format="requirements-txt" \
        --all-extras \
        --no-dev

So I must do

COPY pyproject.toml hatch.toml hatch_build.py ./
RUN set -ex && \
    ${UV_BIN}/uv export \
        --format="requirements-txt" \
        --all-extras \
        --no-dev

It would be nice to be able to have

COPY pyproject.toml ./
RUN set -ex && \
    ${UV_BIN}/uv export \
        --format="requirements-txt" \
        --all-extras \
        --no-dev \
        --only-deps

working.

This would also enable doing

uv pip install --require-hashes

without uv complaining about

error: In `--require-hashes` mode, all requirement must have a hash, but none were provided for: file:///src

Metadata

Metadata

Assignees

Labels

questionAsking for clarification or support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions