Script plone-compile-resources did not get generated

I am developing a new theme using plonecli and barceloneta template. In the base.cfg there is a [plone-helper-scripts] section and I guess this should generate the "plone-compile-resources" script but it doesn't. Does anybody have a good suggestion to move forward here?

[plone-helper-scripts]
recipe = zc.recipe.egg
eggs =
    Products.CMFPlone
    ${instance:eggs}
interpreter = zopepy
scripts =
    zopepy
    plone-compile-resources

My setup is Plone 5.2 using Python 3.

Does the parts value contains plone-helper-scripts? (parts defines which parts buildout should create).

Potentially, you need to append :scripts to zc.recipe.egg (i.e. use recipe = zc.recipe.egg:scripts).

My buildout looks as follows:

[buildout]
extends = https://dist.plone.org/release/5.2-latest/versions.cfg

parts =
    instance
    zopepy

eggs =
    Plone
    Pillow

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs = ${buildout:eggs}
debug-mode = on
verbose-security = on

[zopepy]
recipe = zc.recipe.egg
eggs =
    ${buildout:eggs}
    Products.CMFPlone
interpreter = zopepy
scripts =
    zopepy
    plone-compile-resources

[versions]

I also tried appending :scripts to the zc.recipe.egg ... unfortunately, that did not work either. Only zopepy script has been created. But for example, I was going through the tutorial on https://github.com/collective/collective.jstraining/ and that buildout did create the plone-compile-resources script.

Read the documentation for zc.recipe.egg.

When I remember right, then it generates scripts for "console-script" entry points for the specified eggs. This would mean that either your buildout configuration lacks the egg that has plone-compile-resources as control script entry point or there is no such egg (perhaps because the script name is not correctly written.

My memory also says that scripts for all defined console script entry points are generated when you do not provide a definition for scropts. If this is correct, then you could omit the definition and look which scripts are generated (avoiding potential mispelling problems).

OK. I think I have finally figured it out. In Plone 5.2 the plone-compile-resources script has been moved from Products.CMFPlone to plone.staticresources.

This has been done in following commit: https://github.com/plone/Products.CMFPlone/commit/85afe33e5d61330e5462ad0d29d5588df45c91b7

So the following buildout setup for plone-compile-resources is now required:

[zopepy]
recipe = zc.recipe.egg
eggs =
    ${buildout:eggs}
    plone.staticresources
interpreter = zopepy
scripts =
    zopepy
    plone-compile-resources

Cheers!

1 Like