Skip to content

Only package speechbrain in the wheel - #3088

Open
Kayvan-Zahiri wants to merge 1 commit into
speechbrain:developfrom
Kayvan-Zahiri:wheel-only-speechbrain
Open

Kayvan-Zahiri wants to merge 1 commit into
speechbrain:developfrom
Kayvan-Zahiri:wheel-only-speechbrain

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

What does this PR do?

The 1.1.0 and 1.1.1 wheels install recipes, templates, tools and docs as top-level packages next to speechbrain:

$ unzip -p speechbrain-1.1.1-py3-none-any.whl '*/top_level.txt'
dist
docs
recipes
speechbrain
templates
tools
tutorials

So pip install speechbrain puts a tools and a templates package in site-packages, which can shadow a user's own modules with those names. 1.0.3 shipped only speechbrain. The change came with the move to pyproject in #2946: [tool.setuptools.packages.find] only excludes tests, so every directory with an __init__.py gets packaged.

This switches the finder to include = ["speechbrain", "speechbrain.*"].

Checked by building both ways from develop:

  • wheel: the 252 files under speechbrain/ are identical, and recipes/templates/tools/docs (387 files) are gone. top_level.txt is just speechbrain.
  • sdist: back to the 1.0.3 layout (speechbrain/ plus the metadata files). version.txt and log-config.yaml are still included.

No breaking changes for import speechbrain. Anyone who imported recipes or templates from site-packages was relying on the accidental install.

Before submitting
  • Did you read the contributor guideline?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Does your code adhere to project-specific code style and conventions?

Since the move to pyproject (speechbrain#2946), packages.find only excluded tests, so
the 1.1.0 and 1.1.1 wheels also install recipes, templates, tools and docs
as top-level packages in site-packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant