As one of its latest steps, setup.sh git-clones ganeti_webmgr-config repository in order to:
- get this nice configuration file from that repo,
- copy
gwm-manage.pyexecutable script to virtual env'sbindirectory.
The main drawbacks of this approach are:
- the need to keep two repositories altogether,
- the
gitdependency.
I've looked for any way to include configuration and management files within main GWM distribution. As it turns out, there are two ways to include a file into venv's bin directory using setuptools, but none to create anything outside the virtual env.
In setuptools.setup we can provide scripts and entry_points arguments. The former explicitly says which script to copy to venv's bin directory, the latter says which module/function to build into an OS-specific executable (either shebang'd .py script or .exe file).
Since we're not supporting Windows, I don't think we need to bother with entry_points. On the other hand, our management script requires sed-ing hardcoded paths, it may be easier to do entry_points way.
This file will need to be moved from inside GWM package by setup.sh script. I don't see any other clever solution.
We could implement a template system similar to Django's default project layout or cookiecutter templates. But so far above solutions seem easier.