Using Python 3.4 and Setuptools, I'm trying to get namespace packages to work correctly as defined in PEP 420. My directory structure looks something like this:
- project
- __init__.py
- core
- several .py files
- logging
- com1
- several .py files
- com2
- several .py files
- interface
- misc files
When using setuptools find_package() function, it finds the "project" package, but it doesn't install any of the folders (implicit sub-packages) inside of "project". When I unzip the .egg file, all I see is the __init__.py file inside, none of the subdirectories or files.
I could just put an __init__.py in every directory, but since those files would all be empty and I don't like the way it makes the structure work, I'm trying to avoid that.
If I move to just outside of my "project" directory, and run the following, it works
python -m project.logging.com1.myfile
but anywhere else it doesn't work, because setuptools isn't installing the sub-directories (implicit namespaces) that don't have __init__.py in them.
How can I make setuptools install my implicit namespace packages correctly? Would I just need to tell it to install all files inside the directory and that will be good enough?