plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
6 stars 23 forks source link

Missing support for run scripts in WSGI variant of version 5.0 #49

Closed icemac closed 5 years ago

icemac commented 6 years ago

In older versions (ZServer flavour) it was possible to call run scripts like this:

$ bin/zinstance run my_script.py

The same call on version 5.0 (WSGI flavour) breaks because the first argument must be the config file and the following arguments have to include an equal sign.

Is there currently a way to call such run scripts?

tschorr commented 6 years ago

@icemac I wonder wether p.r.zope2instance is the right place to address this. I could e.g. think of a --run-script option in Zope2.Startup.serve.py.

But to answer your question, I don't know how to currently do this.

icemac commented 6 years ago

@tschorr wrote:

But to answer your question, I don't know how to currently do this.

What a pity. Let's look together into this issue at the Saltlabs Sprint in Halle.

tschorr commented 5 years ago

@icemac I have added two new parts to wsgi.cfg in the 5.2 branch of buildout.coredev:

davisagli commented 5 years ago

How about calling them zoperun/zopedebug or zrun/zdebug instead of wsgirun/wsgidebug? And maybe they would be useful in Zope itself instead of in Plone's buildout?

icemac commented 5 years ago

@tschorr your are a good starting point. Like @davisagli I'd prefer to have the code inside Zope, preferably inside a module to make it readable. I'd love it that if the scripts could created by bin/mkwsgiinstance or if the script created by bin/mkwsgiinstance gets the ability to run scripts or drop into the python console (aka debug.)

icemac commented 5 years ago

Fixed in zopefoundation/Zope#337.