How to add an add-on to Plone 5.2.8 in Windows 10?

The script runwsgi (as well as the scripts addzope2user, mkwsgiinstance, and zconsole) is generated by the recipe zc.recipe.egg in the part [zopescripts] of base.cfg.

The part [zopescripts] is provided by base.cfg and defines only the eggs Zope, Paste, and Plone as "sane defaults". buildout.cfg defines the part zopescript in the section [buildout] without adding any further eggs.

The only workaround I can think of is adding the ${buildout:eggs} to the eggs in [zopescripts]. This would add the eggs in the sys.path of runwsgi.

I can confirm that this works.

But this way all(!) scripts generated by the recipe zc.recipe.egg in the part [zopescripts] will have the buildout.eggs too: i.e. the scripts runwsgi, addzope2user, mkwsgiinstance, and zconsole. Can this be a problem?

Has anyone any other idea how to add the eggs into the sys.path of runwsgi in Windows 10?

I still really wonder whether anyone has succesfully installed and developed an add-on with Plone 5.2.8 on Windows 10? And if - as mentioned - the answer is "yes", I'd like to know how?

mekell via Plone Community wrote at 2022-7-20 18:46 +0000:

...
But this way all(!) scripts generated by the recipe zc.recipe.egg in the part [zopescripts] will have the buildout.eggs too: i.e. the scripts runwsgi, addzope2user, mkwsgiinstance, and zconsole. Can this be a problem?

zconsole corresponds to bin/{instance|client1} {debug|run}.
It should have all eggs.
The other scripts would not need the additional eggs, but they
should not create a problem.

Has anyone any other idea how to add the eggs into the sys.path of runwsgi in Windows 10?

zc.recipe.egg knows about a scripts (or similarly spelled --
read the documentation) configuration variable which allows to
control which scripts are generated.
Defining the variable (more precisely overriding it in your
top level buildout configuration) would allow to only
create runwsgi and zconsole.
If necessary, you could add another "part" and there create
the remaining scripts with other eggs (but it should not be necessary).

I still really wonder whether anyone has succesfully installed and developed an add-on with Plone 5.2.8 on Windows 10? And if - as mentioned - the answer is "yes", I'd like to know how?

I think you found it out yourself.

@dieter: thank you for the hint.

I just had a similar idea a few minutes ago:

[myclient1]
client_number = 1
eggs =
    ${buildout:eggs}
    ${zopescripts:eggs}
recipe = zc.recipe.egg
initialization = 
    import os
    sys.argv[1:1] = [os.path.join(r'${buildout:directory}', 'parts', 'client${:client_number}', 'etc', 'wsgi.ini')]
scripts = ${:_buildout_section_name_}
entry-points = ${:_buildout_section_name_}=Zope2.Startup.serve:main

From Setuptools documentation:

Automatically generate wrapper scripts or Windows (console and GUI) .exe files for any number of “main” functions in your project. (Note: this is not a py2exe replacement; the .exe files rely on the local Python installation.)