Skip to content

packages_distributions doesn’t work for some dist-info packages built outside Setuptools #330

@flying-sheep

Description

@flying-sheep

I assume that for those packages, something similar to the following will work to retrieve the top level packages/modules contained in a distribution

{
    f.parts[0] if len(f.parts) > 1 else f.with_suffix('').name
    for f in pkg.files if f.suffix == ".py"
}

Of course there’s a lot of edgecases

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions