extra_requires of recipes not always installed

Bug #583752 reported by Florian Schulze
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

This might or might not be related to https://bugs.launchpad.net/zc.buildout/+bug/85604

If you use a recipe with different extra requires, then the second extras aren't installed, because buildout only checks whether the recipe itself is installed (which is true) but doesn't check the extras (or pkg_resources doesn't, not sure).

Example:

[buildout]
parts = template1 template2

[template1]
recipe = collective.recipe.template
inline =
output = template1.txt

[template2]
recipe = collective.recipe.template[genshi]:genshi
inline =
output = template2.txt

Because collective.recipe.template is already installed, the extra_requires Genshi isn't installed.

Revision history for this message
Servilio Afre Puentes (servilio) wrote :

At least for me, running "bin/buildout install template2" works fine.

Also, after having installed the individual part, and hence having Genshi in the eggs-directory, running the whole buildout won't work yet.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :

This bug is twofold:

 1) The collective.recipe.template package doesn't specify that the genshi entry point requires the genshi extras. This is easily resolved by adding "[genshi]" to the end of the entry line in setup.py - I will shortly have commit access to make this change.

 2) Buildout does not check a recipe's extra requirements before installing or updating, so if the main project for the recipe is installed, the extras will not be installed. I have attached a patch to fix this point.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :

That patch is for buildout version 1.5.2.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :

Previous patch interpreted the names of extras as requirements which is incorrect. This patch is better and also includes a test.

Revision history for this message
Florian Schulze (florian-schulze) wrote :

Thanks for looking into this and providing the patch!

Please don't change anything in collective.recipe.template though. I created a package to work around the issue (collective.recipe.genshi) and changing collective.recipe.template would break it for older buildouts. So please only fix zc.buildout but don't do anything in collective.recipe.template.

Revision history for this message
Richard Mitchell (mitchellrj) wrote :

Great, thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.