I have a distribution with multiple package and sub packages. There are many empty __init__.py
files used to tell setuptools
that the folders are packages.
In python 3.3 onwards, setuptools supports find_namespace_packages
. So is it a good idea to get rid of the empty __init__.py
files and replace the find_packages with find_namespace_packages?
There are three ways to namespace packages, each with its own pros and cons. It is true that find_namespace_packages
is the recommended solution for Python3+ projects; though remember that this does not mean you omit all __init__.py
files, you only remove the __init__.py
in the namespace root.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With