Skip to content

Fix setuptools package discovery#16

Merged
anistark merged 2 commits into
anistark:mainfrom
agriyakhetarpal:fix-setuptools-package-discovery
Jul 4, 2025
Merged

Fix setuptools package discovery#16
anistark merged 2 commits into
anistark:mainfrom
agriyakhetarpal:fix-setuptools-package-discovery

Conversation

@agriyakhetarpal
Copy link
Copy Markdown
Contributor

In src/ layouts, setuptools automatically discovers packages under src/<package_name>, but if you specify both tool.setuptools.packages and tool.setuptools.package-dir, then packages must have a list of all subpackages inside tool.setuptools.package-dir. This PR removes tool.setuptools.packages in favour of tool.setuptools.packages.find so that we can rely on automated discovery mechanisms.

I also introduced a MANIFEST.in file here as I noticed that the __pycache__ files in the installation were being included.

Switching to hatchling would provide better defaults; please let me know if you desire it and I can open a follow-up PR.

Closes #15

Copy link
Copy Markdown
Owner

@anistark anistark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing it.

@anistark
Copy link
Copy Markdown
Owner

anistark commented Jul 4, 2025

we can try hatchling. Haven't explored it myself yet though.

@anistark anistark merged commit 34934bf into anistark:main Jul 4, 2025
@agriyakhetarpal agriyakhetarpal deleted the fix-setuptools-package-discovery branch July 4, 2025 15:51
@agriyakhetarpal
Copy link
Copy Markdown
Contributor Author

Sounds good! I opened a follow-up PR at #17; linked above.

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.

Cannot run with pipx run or uvx

2 participants