I am trying to upgrade a buildout from Plone 5.2 (py3) to Plone 6.0 (py 3.11). I have a package with subpackages meant to setup my site policy and theme (mysite.policy, mysite,theme) with each subpackage appearing as its own Add-on in Plone. This setup worked in 5.2 but the subpackages are not being loaded (not appearing in Add-ons list) in 6.0. After some digging around, this seems to be related to differences in plone.autoinclude
vs z3c.autoinclude
. I took a look at examples in the repo, but I'm not sure if any of them match my case: plone.autoinclude/test-packages at e01ebaa3633ac435cc909e1f5b54d2a8b62c938c · plone/plone.autoinclude · GitHub
How do I get Plone to recognize the subpackages in a 6.0 buildout setup?
setup.py snippets
name='mysite',
# [...]
packages=find_packages(exclude=['ez_setup']),
namespace_packages=['mysite'],
include_package_data=True,
zip_safe=False,
install_requires=[
'setuptools',
# ...
],
entry_points="""
# -*- Entry points: -*-
[z3c.autoinclude.plugin]
target = plone
""",
In my setup.py, I've tried both the z3c.autoinclude.plugin and plone.autoinclude.plug in entrypoints. Plone does seem to load mysite
but none of the subpackages.
Example structure:
buildout_root_directory
├── setup.py
├── ...
└── mysite/
├── __init__.py
├── ...
├── policy/
│ ├── __init__.py
│ ├── configure.zcml
│ └── ...
└── theme/
│ ├── __init__.py
│ ├── configure.zcml
│ └── ...
└─ ...