4teamwork/ftw.builder — pull request #34 by lukasgraf (2014-11-28 10:49:50+00:00)
Title: Possibly restore Plone 4.1 compatibility

Currently `ftw.builder` is still used by some packages that offer Plone 4.1 compatibility ([`ftw.contentpage`](https://jenkins.4teamwork.ch/job/ftw.contentpage-master-test-plone-4.1.x.cfg/1052/) and [`ftw.contenttemplates`](https://jenkins.4teamwork.ch/job/ftw.contenttemplates-master-test-plone-4.1.x.cfg/834/)) to name just two).

Because the recent change from #32 now [unconditionally imports the Dexterity builders](https://github.com/4teamwork/ftw.builder/commit/680d2f60662359569ef62e0eaf78dd8b7cb37a0b), `ftw.builder` will fail on Plone 4.1 because Dexterity isn't shipped by default up until Plone 4.2.

We have a couple options here:

- Drop 4.1 support in those packages
- Restore 4.1 compatibility in `ftw.builder` by either
- making all Dexterity imports conditional on the Plone version (or the [availability of `plone.dexterity`](http://docs.plone.org/external/plone.api/docs/contribute/conventions.html#about-imports)). This currently would require defining a `HAS_DEXTERITY` somewhere, and making the [imports in `content.py`](https://github.com/4teamwork/ftw.builder/blob/master/ftw/builder/content.py#L3-4) and [`test_content.py`](https://github.com/4teamwork/ftw.builder/blob/master/ftw/builder/tests/test_content.py#L5) conditional
- or adding `plone.app.dexterity` to `ftw.builder`'s requirements in `setup.py` and extending from the [old-style Dexterity KGS](http://docs.plone.org/external/plone.app.dexterity/docs/install.html#installing-dexterity-on-older-versions-of-plone) in `test-plone.4.1.x.cfg`. This would also require the [`test-plone-4.1.x.cfg` from `ftw-buildouts`](https://github.com/4teamwork/ftw-buildouts/blob/master/test-plone-4.1.x.cfg) to extend from the DX KGS though, not sure what the implications of that would be.

@jone @maethu @phgross @deiferni

What do you think?