heroku / heroku/buildpacks-python

Support Dev Dependencies

Open
#372 10 comments 3 reactions 0 assignees View on GitHub
classic buildpack parity enhancement
Dominant language
Rust
Stars
33
Forks
3
Avg merge
12h 51m
Merged PRs (30d)
9

Description

Hi! My name is Alek, and I am interested in using this Buildpack in a tool to create both Development and Production images of an application.

I did a little digging through the codebase (I don't know Rust, so I relied pretty heavily on Claude), and it seems I'm not currently able to override which set of dependencies the Buildpack pulls in (I.E. something like modifying the `pip install -r requirements.txt` command to `pip install -r dev-requirements.txt` or modifying the `uv sync` command to `uv sync --group dev`).

Would it be possible to add one or more configuration options to this Buildpack to support this feature?

## Possible Implementation

If I understand the Buildpack Specification correctly, this could be done through [one or more environment variables](https://github.com/buildpacks/spec/blob/main/buildpack.md#provided-by-the-platform) of the form `BP_*`.

Would something like this make sense:

`BP_PIP_REQUIREMENTS=`
`BP_UV_GROUP=`

I believe if `BP_PIP_REQUIREMENTS` was set, then you would need to detect that file to pass detection. If `BP_UV_GROUP` was set, you would fail detection if `uv.lock` was missing.

I am unfamiliar with `poetry`, so I'm unsure what the appropriate mechanism for that tool would be.

**PS** Hi @edmorley! It was a pleasure meeting you at PyCon!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.