Skip to content

AVRO-4308: [python] Fix interop build failure from setuptools package discovery - #3894

Merged
RyanSkraba merged 1 commit into
apache:mainfrom
iemejia:AVRO-4308-docker-interop
Jul 21, 2026
Merged

RyanSkraba merged 1 commit into
apache:mainfrom
iemejia:AVRO-4308-docker-interop

Conversation

@iemejia

@iemejia iemejia commented Jul 21, 2026

Copy link
Copy Markdown
Member

What is the purpose of the change

This pull request fixes the local/Docker Python interop build, which fails with:

error: Multiple top-level packages discovered in a flat-layout: ['avro', 'userlogs'].

The Hadoop tether tests leave behind a userlogs/ directory next to the
avro/ package. Because pyproject.toml did not configure package
discovery, setuptools falls back to automatic flat-layout discovery, sees
two top-level packages (avro and userlogs), and refuses to build. This
does not surface in GitHub Actions because each language is tested in
isolation and the tether tests never create userlogs/ there.

The fix explicitly scopes setuptools package discovery to avro*, so stray
directories such as userlogs/ are ignored. This resolves AVRO-4308.

Verifying this change

This change is already covered by the existing interop test targets:

  • Reproduced the failure by running ./build.sh interop-data-generate in
    lang/py with a userlogs/ directory present.
  • After the fix, ./build.sh interop-data-generate and
    ./build.sh interop-data-test both succeed.
  • Confirmed discovery still resolves the expected packages:
    find_packages(include=["avro*"]) -> ['avro', 'avro.test', 'avro.tether'].

Documentation

  • Does this pull request introduce a new feature? no

… discovery

The local Docker interop build failed with "Multiple top-level packages
discovered in a flat-layout: ['avro', 'userlogs']". The Hadoop tether
tests leave a userlogs/ directory next to the avro/ package, which breaks
setuptools automatic flat-layout package discovery.

Explicitly scope package discovery to avro* so stray directories such as
userlogs/ are ignored.
@iemejia
iemejia requested a review from RyanSkraba July 21, 2026 12:40
@RyanSkraba
RyanSkraba merged commit eab0e48 into apache:main Jul 21, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants