I would like to create a library, say foolib, but to keep different subpackages separated, so to have barmodule, bazmodule, all under the same foolib main package. In other words, I want the client code to be able to do
import foolib.barmodule
import foolib.bazmodule
but to distribute barmodule and bazmodule as two independent entities. Replace module with package as well... ba[rz]module can be a fukll fledged library with complex content.
The reason behind this choice is manifold:
- I would like a user to install only barmodule if he needs so.
- I would like to keep the modules relatively independent and lightweight.
- but I would like to keep them under a common namespace.
jQuery has a similar structure with the plugins.
Is it feasible in python with the standard setuptools and install procedure ?