Here are a few different Python packages that my company foo.com uses:
com.foo.bar.web
com.foo.bar.lib
com.foo.zig.web
com.foo.zig.lib
com.foo.zig.lib.lib1
com.foo.zig.lib.lib2
Here's the traditional way to store the source on disk:
pysrc/
com/
foo/
bar/
web/
lib/
zig/
web/
lib/
lib1/
lib2/
PYTHONPATH=pysrc
But for organizational purposes (different teams, different version control, etc.) we want to save them as follows:
bar/
pysrc/
com/
foo/
bar/
web/
lib/
zig/
pysrc/
com/
foo/
zig/
web/
lib/
lib1/
lib2/
PYTHONPATH=bar/pysrc:zig/pysrc
Question:
Are there any problems with this second method of organization?
For example, if we are import com.foo, where will Python be looking __init__.py?
Will simling these directories make sense? eg:.
pysrc/
com/
foo/
bar/ -> symlink to /bar/pysrc/com/foo/
zig/ -> symlink to /zig/pysrc/com/foo/
Any suggestions from the organizing committee are welcome.
source
share