On 7/23/09 12:10 PM, yuppie wrote:
Hi!
SOFTWARE_HOME no longer exist in Zope 2.12, all the software is now somewhere on sys.path.
So this no longer works in zopectl:
ZDCTL="$SOFTWARE_HOME/Zope2/Startup/zopectl.py" exec "$PYTHON" "$ZDCTL" -C "$CONFIG_FILE" "$@"
Therefore mkzopeinstance now creates something like this:
ZDCTL="/path/to/eggs/Zope2-2.12.0b3-py2.5-linux-i686.egg/Zope2/Startup/zopectl.py" exec "$PYTHON" "$ZDCTL" -C "$CONFIG_FILE" "$@"
Problem: --------
- the code in mkzopeinstance.py that looks up the Zope2 path fails on some platforms
- if the software is updated, you have to change the paths in runzope and zopectl of each instance
Solution: ---------
1.) Add two new entry points in setup.py:
runzope=Zope2.Startup.run:run zopectl=Zope2.Startup.zopectl:run
If the software is installed, executable runzope and zopectl files are created in the bin directory. That should work with zc.buildout and with easy_install.
2.) Modify the runzope and zopectl files created by mkzopeinstance:
The result should look like this:
ZDCTL="/path/to/install/bin/zopectl" exec "$ZDCTL" -C "$CONFIG_FILE" "$@"
mkzopeinstance would make the assumption that executable runzope and zopectl files exist in the same directory as mkzopeinstance itself.
Risks: ------
- mkzopeinstance has a --python option. The specified Python interpreter will no longer be used to execute runzope or zopectl.
- uses cases might exist that no longer work after that change
Any thoughts? Is the 2.12 branch still open for changes like that?
+1 Wichert.