Skip to content

Standard Python support #3290

@flying-sheep

Description

@flying-sheep

There’s exactly two standard ways of specifying dependencies, none of which dependabot supports.

  1. PEP 517’s prepare_metadata_for_build_wheel().

    The legacy way to specify Python dependencies is requirements.txt. The standard way is having a PEP 517 build system configured. That build system can optionally define a function called prepare_metadata_for_build_wheel. If that function exists, the dependencies can be obtained (from the metadata) without building a wheel, otherwise build_wheel() needs to be called.

    Code to just do the above would look like:

    import build
    deps = build.ProjectBuilder("path/to/project").get_dependencies("sdist")
    # or
    deps = build.ProjectBuilder("path/to/project").get_dependencies("wheel") - {"wheel"}
  2. PEP 631 a new standardized way to specify dependencies in a Python project (now merged into PEP 621).

    It’s supported by flit and a bunch of other new build backends. So if you want to continue your (incomplete) way of just parsing files and not calling into Python, this needs to be supported.

Metadata

Metadata

Labels

T: feature-requestRequests for new featurespythonDependabot pull requests that update Python code

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions