问题
I have once seen a Python package with one flat src/ folder containing setup.py
, but which still declare itself as namespace
or namespace.foo
package and you can import files from the package as from namespace.foo import x
.
This was done with some setup.py
option and tricks. However, I have unable to find the source or the package how this was done and I am now looking for examples for it.
来源:https://stackoverflow.com/questions/9587667/folderless-namespaced-packages-with-setuptools