Op 10-05-10 10:05, Hedley Roos schreef: > Hi > > I've been able to successfully avoid this problem for a while now, but > with Plone 4 looming I have to face it. > > The issue is with dependencies explicitly listed in an egg's setup.py. > As an example PloneSoftwareCenter lists Products.ArchAddOn. Not > Products.ArchAddOn<=1.5 etc but just the egg name. > > The PloneSoftwareCenter release is 1.5.5 which is still compatible with > Plone 3, but ArchAddOn now has an 1.6 as the latest release. That > version tries to pull in Plone>=4.0dev. > > Attempting to pin ArchAddOn to 1.5 in buildout.cfg is futile since the > setup.py file seems to always win. > > Does anyone know how to force version 1.5?
I think you are missing a line in the [buildout] part: versions = versions Without that line, you can have a [versions] section, but this will just get ignored. (Of course, a versions=versions line may already be present in a buildout config file that you are extending.) See my weblog: http://maurits.vanrees.org/weblog/archive/2008/01/easily-creating-repeatable-buildouts > And what is the best practice > for setup.py files? Should you specify a version range or not? You should specify a version range if you know that versions outside of those range will cause problems. As an example, let me explain my reasoning for the current pinnings in Poi. Products.Poi branch 1.2 (Plone 3 only) currently has: install_requires=[ 'setuptools', 'Products.AddRemoveWidget<1.5dev', 'Products.DataGridField>=1.6b3,<1.8dev', ], I know that AddRemoveWidget trunk (version 1.4.3dev) still is fine for Plone 3 and Plone 4; but I highly suspect that a future version 1.5 will be for Plone 4 only, so I already restrict the version here. That is a judgement call and I might be wrong. For DataGridField I know I need at least version 1.6b3 as Poi uses a validator that was introduced in that version (code ported from Poi actually) so I define that as minimum version. I know that version 1.8 is Plone 4 only, so I add 1.8dev as maximum version. I do not specify Plone as dependency, as this would get tricky when people use Poi on Plone 3.0 or 3.1 as those versions had no Plone egg yet. Products.Poi trunk (for Plone 4 only) currently has: install_requires=[ 'setuptools', 'Plone>=4.0a1', 'Products.AddRemoveWidget>=1.4.2', 'Products.DataGridField>=1.8a1', 'collective.autopermission', 'collective.watcherlist>=0.2', ], This is Plone 4 only and will fail with Plone 3, so I specify Plone as dependency and have 4.0a1 as minimum version. I may update that to a beta version and specify just '4.0' once the final Plone release is out. I think I specified AddRemoveWidget 1.4.2 as minimum version because this is the first version that has proper GenericSetup install code; I'm not sure it would actually fail with earlier versions. DataGridField 1.8a1 is the first release that is compatible with Plone 4. collective.autopermission is needed; as far as I know any version works. collective.watcherlist has some code that used to be in Poi 1.2, so this is a new dependency. I know 0.2 has fixes that are good to have, so I specified it as minimum. -- Maurits van Rees Programmer, Zest Software _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
