Skip to content

setuptools.find_packages() without parameters not excluding tests #4082

Closed Answered by abravalheri
penguinpee asked this question in Q&A
Discussion options

You must be logged in to vote

According to the Automatic Discover should be necessary. What am I missing?

The docs suggest you leave out the packages config completely, so setuptools finds it out based on some heuristics (shold work for the majority of pckages). This paragraph from the docs is relevant:

Automatic discovery will only be enabled if you don’t provide any configuration for packages and py_modules. If at least one of them is explicitly set, automatic discovery will not take place.

If automatic discovery is not enough for your project structure, then you can use find_packages for customisation. Note, however, that when you use find_packages , you are in complete control: no heuristics are applied. So yo…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by penguinpee
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants