I have a directory structure like so:
Package/
setup.py
src/
__init__.py
__main__.py
code.py
I often use this setup because it works better with python setup.py develop
Package_root/
setup.py
src/
Package/
__init__.py
__main__.py
code.py
It's probably not (yet) the detailed answer you're expecting but I think it's worth trying for the three use cases.
setup( ...
package_dir = {'': 'src'},
entry_points = {'console_scripts': ['Package = Package.__main__:main'],},
packages = find_packages(exclude=["Package.egg_info",]),
...)