Skip to content

Commit

Permalink
Move ZServer related console scripts into ZServer.
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Aug 7, 2016
1 parent 62d6e25 commit 519ca22
Show file tree
Hide file tree
Showing 18 changed files with 299 additions and 1,565 deletions.
10 changes: 8 additions & 2 deletions buildout.cfg
Expand Up @@ -8,7 +8,8 @@ extends =
versions.cfg
parts =
test
scripts
zopescripts
zserverscripts
zopepy
alltests
ztktests
Expand All @@ -30,11 +31,16 @@ initialization =
eggs = Zope2


[scripts]
[zopescripts]
recipe = zc.recipe.egg
eggs = Zope2


[zserverscripts]
recipe = zc.recipe.egg
eggs = ZServer


[zopepy]
recipe = zc.recipe.egg
eggs = Zope2
Expand Down
6 changes: 0 additions & 6 deletions docs/INSTALL-buildout.rst
Expand Up @@ -144,12 +144,6 @@ used.

instancehome $INSTANCE

A fully-annotated sample can be found in the Zope2 egg::

$ cat eggs/Zope2--*/Zope2/utilities/skel/etc/example.conf.in

<rest of the stuff that goes into a zope.conf, e.g. databases and log files.>

.. highlight:: bash

An example session::
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Expand Up @@ -113,12 +113,9 @@ def _read_file(filename):
'httpexceptions=Zope2.Startup.httpexceptions:main',
],
'console_scripts': [
'mkzopeinstance=Zope2.utilities.mkzopeinstance:main',
'runwsgi=Zope2.Startup.serve:main',
'runzope=Zope2.Startup.run:run',
'zopectl=Zope2.Startup.zopectl:run',
'zpasswd=Zope2.utilities.zpasswd:main',
'addzope2user=Zope2.utilities.adduser:main',
'runwsgi=Zope2.Startup.serve:main',
'mkwsgiinstance=Zope2.utilities.mkwsgiinstance:main',
],
},
)
2 changes: 1 addition & 1 deletion src/Zope2/Startup/__init__.py
Expand Up @@ -20,7 +20,7 @@

# BBB Zope 5.0
deprecated(
'Please import from ZServer.Startup.starter',
'Please import from ZServer.Zope2.Startup.starter',
UnixZopeStarter='ZServer.Zope2.Startup.starter:UnixZopeStarter',
WindowsZopeStarter='ZServer.Zope2.Startup.starter:WindowsZopeStarter',
ZopeStarter='ZServer.Zope2.Startup.starter:ZopeStarter',
Expand Down
22 changes: 6 additions & 16 deletions src/Zope2/Startup/run.py
Expand Up @@ -12,19 +12,13 @@
#
##############################################################################

from zope.deferredimport import deprecated

def run():
""" Start a Zope instance """
import Zope2.Startup
starter = Zope2.Startup.get_starter(wsgi=False)
opts = _setconfig()
starter.setConfiguration(opts.configroot)
try:
starter.prepare()
except:
starter.shutdown()
raise
starter.run()
# BBB Zope 5.0
deprecated(
'Please import from ZServer.Zope2.Startup.run',
run='ZServer.Zope2.Startup.run:run',
)


def configure(configfile):
Expand Down Expand Up @@ -75,7 +69,3 @@ def make_wsgi_app(global_config, zope_conf):
starter.setConfiguration(opts.configroot)
starter.prepare()
return publish_module


if __name__ == '__main__':
run()
2 changes: 1 addition & 1 deletion src/Zope2/Startup/tests/test_schema.py
Expand Up @@ -62,7 +62,7 @@ def load_config_text(self, text):
def test_load_config_template(self):
import Zope2.utilities
base = os.path.dirname(Zope2.utilities.__file__)
fn = os.path.join(base, "skel", "etc", "base.conf.in")
fn = os.path.join(base, "skel", "etc", "wsgi.conf.in")
f = open(fn)
text = f.read()
f.close()
Expand Down

0 comments on commit 519ca22

Please sign in to comment.