Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup.py packages to avoid installing "examples" and "docs" #672

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

natsukium
Copy link

This project has unintentionally included docs and examples in the packages.
As a result, running pip install dm-haiku will include them under site-packages, and you can import them like from docs import conf.

It is a common pitfall when using setuptools.find_namespace_packages() with flat layouts, and you need to set the excludes appropriately.

Steps To Reproduce

  1. Prepare a clean Python environment with docker, venv, etc.
    docker run --rm -it python:3.10-slim bash
  2. Install dm-haiku
    pip install dm-haiku
  3. Check under site-packages
    ls /usr/local/lib/python3.10/site-packages/ | grep docs
  4. Check if the docs can be imported
    python -c 'from docs import conf'

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.

None yet

1 participant