Skip to content

Commit

Permalink
Back to explicit option
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Oct 29, 2018
1 parent 410f0bb commit 63b1a74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 0 additions & 5 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ Changelog

Breaking changes:

- Determine whether to set up a WSGI-based instanced
automatically based on whether ZServer is included in the eggs,
instead of explicitly using the ``wsgi`` option.
[davisagli]

- For WSGI-based instances, generate a zdaemon-based instance script
that works similarly to ZServer-based instances, instead of a
script that only handles running the WSGI server.
Expand Down
10 changes: 4 additions & 6 deletions src/plone/recipe/zope2instance/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(self, buildout, name, options):
buildout['buildout'].get('include-site-packages', 'false')
) not in ('off', 'disable', 'false')

self.wsgi = options.get('wsgi') in ('on', 'waitress')
# Get Scripts' attributes
return Scripts.__init__(self, buildout, name, options)

Expand All @@ -95,18 +96,14 @@ def install(self, update=False):
make.make_instance(options.get('user', None), location, version)

try:
requirements, ws = self.egg.working_set(
['plone.recipe.zope2instance'])
self.wsgi = 'zserver' not in ws.by_key

# Make a new zope.conf and wsgi.ini
# based on options in buildout.cfg
self.build_zope_conf()
if self.wsgi:
self.build_wsgi_ini()

# Install extra scripts
installed.extend(self.install_scripts(ws))
installed.extend(self.install_scripts())

# Add zcml files to package-includes
self.build_package_includes()
Expand Down Expand Up @@ -609,7 +606,7 @@ def build_wsgi_ini(self):
with open(wsgi_ini_path, 'w') as f:
f.write(wsgi_ini)

def install_scripts(self, ws):
def install_scripts(self):
options = self.options
location = options['location']

Expand All @@ -622,6 +619,7 @@ def install_scripts(self, ws):
zopectl_umask = options.get('zopectl-umask', '')

extra_paths = options.get('extra-paths', '').split()
requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
reqs = [self.options.get('control-script', self.name)]
reqs.extend(['plone.recipe.zope2instance.ctl', 'main'])
reqs = [tuple(reqs)]
Expand Down

0 comments on commit 63b1a74

Please sign in to comment.