Skip to content

Building sdist uses wrong gitignore #1641

@blmaier

Description

@blmaier

This is a continuation of the issue from #1273. In that issue the gitignore code was changed to stop searching when it found a .git directory. However sdist bundles do not include that directory. This causes hatch to continue searching through parent directories until it finds one.

This is causing issues in Buildroot as we download the sdist for python-jsonschema-specifications and build it. But that project lacks a .gitignore. We recently added our own .gitignore containing just * to a parent directory in buildroot/buildroot@a14c862. But this inadvertently broke that package so it ignores everything.

In #1273 @ofek suggested stopping the search if PKG-INFO is found, which should fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions